Skip to content

Instantly share code, notes, and snippets.

@tkaemming
Created February 24, 2017 19:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkaemming/33a6fafaa009737c2007fd0905f89f90 to your computer and use it in GitHub Desktop.
Save tkaemming/33a6fafaa009737c2007fd0905f89f90 to your computer and use it in GitHub Desktop.
six.binary_type
Python 3.5.0 (default, Sep 23 2015, 04:42:00)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.72)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import six
>>> six.binary_type(10)
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Python 2.7.10 (default, Jul 14 2015, 19:46:27)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import six
>>> six.binary_type(10)
'10'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment