-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Under Py3k, 'binary' is an alias for 'bytes'.
Also, update changelog to show changes merged from the 'py2_explicit_bytes' branch.
- Loading branch information
Showing
2 changed files
with
17 additions
and
6 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
# Make a package. | ||
import sys | ||
|
||
class binary(bytes): | ||
"""Mark a given string as explicitly binary | ||
if sys.version_info[0] < 3: | ||
class binary(bytes): | ||
"""Mark a given string as explicitly binary | ||
I.e., it should be unpickled as bytes on Py3k, rather than being | ||
forcibly promoted to unicode. | ||
""" | ||
I.e., it should be unpickled as bytes on Py3k, rather than being | ||
forcibly promoted to unicode. | ||
""" | ||
else: | ||
binary = bytes |