openmedialibrary_platform_d.../lib/python3.5/site-packages/pyasn1/compat/binary.py
2016-02-06 15:06:57 +05:30

10 lines
201 B
Python

from sys import version_info
if version_info[0:2] < (2, 6):
def bin(x):
if x <= 1:
return '0b'+str(x)
else:
return bin(x>>1) + str(x&1)
else:
bin = bin