471,336 Members | 1,253 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,336 software developers and data experts.

Code objects

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,\
inspect.iscode)]

--
Evan Klitzke <ev**@yelp.com>
Jul 24 '07 #1
0 719

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

171 posts views Thread by tshad | last post: by
17 posts views Thread by tshad | last post: by
6 posts views Thread by TPJ | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.