Created
April 24, 2013 06:32
-
-
Save yuuichi-fujioka/5450057 to your computer and use it in GitHub Desktop.
reflection examples for function
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
def my_func(hoge,fuga,name='scot'): | |
'''comment message''' | |
print my_func.func_code.co_varnames # ('hoge', 'fuga', 'name') | |
print my_func.func_name # my_func | |
hoge_func = my_func | |
print hoge_func.func_code.co_name # my_func | |
print my_func.func_code.co_argcount # 3 | |
print hoge_func.func_defaults # ('scot',) | |
print my_func.func_doc # 'comment message' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment