How to get a Function object from a Frame object

2005-04-18 Thread Gigi
bject (f.f_code), but not the actual function or method object. The inspect module doesn't help either it just provides nicer interface to the Frame object. Any ideas out there? Thanks, Gigi -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get a Function object from a Frame object

2005-04-22 Thread Gigi
Greg Ewing wrote: Steven Bethard wrote: Gigi wrote: I need access to a function object that corresponds to a frame object in a certain case from inside the function. Can you look up the code's co_name in the previous frame's locals? You probably also need to check the previous frame

__getattribute__ and __getattr__

2005-05-29 Thread Gigi
Hi, In the Python documentation regarding __getattribute__ (more attribute access for new style classes) it is mentioned that if __getattribute__ is defined __getattr__ will never be called (unless called explicitely). Here is the exact citation: """ The following methods only apply to new-styl

Re: __getattribute__ and __getattr__

2005-05-30 Thread Gigi
Terry Reedy wrote: > "Gigi" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Hi, >>In the Python documentation regarding __getattribute__ (more attribute >>access for new style classes) it is mentioned that if __getattribute__ &g

Re: __getattribute__ and __getattr__

2005-05-30 Thread Gigi
Terry Reedy wrote: > "Gigi" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Hi, >>In the Python documentation regarding __getattribute__ (more attribute >>access for new style classes) it is mentioned that if __getattribute__ &g

Re: __getattribute__ and __getattr__

2005-05-31 Thread Gigi
Terry Reedy wrote: > "Gigi" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Hi, >>In the Python documentation regarding __getattribute__ (more attribute >>access for new style classes) it is mentioned that if __getattribute__ &g