Created
November 20, 2015 20:06
-
-
Save amckinley/b9b66024282f2ebec87b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> foo = bytearray(5) | |
>>> foo[0] = 100 | |
>>> foo[0] = 500 | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
ValueError: byte must be in range(0, 256) | |
>>> foo[0] | |
100 | |
>>> chr(foo[0]) | |
'd' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment