MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / readchar

Function readchar

18-with-match/lispy/original/lispy.py:53–59  ·  view source on GitHub ↗

Read the next character from an input port.

(inport)

Source from the content-addressed store, hash-verified

51 return token
52
53def readchar(inport):
54 "Read the next character from an input port."
55 if inport.line != '':
56 ch, inport.line = inport.line[0], inport.line[1:]
57 return ch
58 else:
59 return inport.file.read(1) or eof_object
60
61def read(inport):
62 "Read a Scheme expression from an input port."

Callers

nothing calls this directly

Calls 1

readMethod · 0.80

Tested by

no test coverage detected