> # constants > > EOH = b'\r'[0] > CHAR = b'C'[0] > DATE = b'D'[0] > FLOAT = b'F'[0] > INT = b'I'[0] > LOGICAL = b'L'[0] > MEMO = b'M'[0] > NUMBER = b'N'[0] > > This is not beautiful code. In this case, I think the intent would be better captured with def ASCII(c): return c.encode('ascii') EOH = ASCII('\r') # 0D CHAR = ASCII('C') # 43 DATE = ASCII('D') # 44 FLOAT = ASCII('F') # 46 INT = ASCII('I') # 49 LOGICAL = ASCII('L') # 4C MEMO = ASCII('M') # 4D NUMBER = ASCII('N') # 4E This expresses the intent that a) these are really byte values, not characters, and b) the specific choice of byte values was motivated by ASCII. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4