Skip to content

Instantly share code, notes, and snippets.

@squeaky-pl
Created April 9, 2014 22:16
Show Gist options
  • Save squeaky-pl/10324214 to your computer and use it in GitHub Desktop.
Save squeaky-pl/10324214 to your computer and use it in GitHub Desktop.
if member.func_code.co_filename != modfile:
AttributeError: 'builtin-code' object has no attribute 'co_filename'
>>>> from pdb import pm
>>>> pm()
> /home/squeaky/workspace/portable-pypy/testenv2/site-packages/clonedigger/logilab/astng/builder.py(540)object_build()
-> if member.func_code.co_filename != modfile:
(Pdb) member
<function __delattr__ at 0x0000000001b0ffa0>
(Pdb) member.func_code.co_filename
*** AttributeError: 'builtin-code' object has no attribute 'co_filename'
(Pdb) member.func_code
<builtin-code object at 0x0000000001e82fe0>
(Pdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment