Last active
December 16, 2015 02:09
-
-
Save tyochiai/5360285 to your computer and use it in GitHub Desktop.
doctest のバグ?
(Python 3.3.1 (v3.3.1:d9893d13c628, Apr 6 2013, 20:25:12) [MSC v.1600 32 bit (Intel)] on win32)
This file contains 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
def test(byte): | |
""" | |
byte is 0-255 integer. | |
>>> test(1) | |
1 | |
>>> test(b"\x01"[0]) | |
1 | |
>>> test(128) | |
128 | |
>>> test(b"\x80"[0]) | |
128 # SyntaxError: bytes can only contain ASCII literal characters. | |
""" | |
return byte |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment