Created
May 23, 2017 04:18
-
-
Save ericzhong/fa6cf8b2400ef777ac25efa92d595ab4 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
a = int('101', base=2) | |
from functools import partial | |
b2i = partial(int, base=2) | |
b = b2i('101') | |
def btoi(x, base=2): | |
return int(x, base) | |
c = btoi('101') | |
print(a,b,c) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment