Code objects

Evan Klitzke evan at
Tue Jul 24 08:55:12 CEST 2007

I was playing around with the inspect module tonight, and I have a
question about "code components". Can an object have more than one
code component? For example, will the following code ever create a
list whose length is greater than one?

import inspect

# Some code here defining an object/function foo

components = [cc[1] for cc in inspect.getmembers(foo,\

Evan Klitzke <evan at>

More information about the Python-list mailing list