Hello,

In the interactive pylons debugger:

 >>> dir(self)
['__call__', '__class__', '__delattr__', '__dict__', '__doc__', 
'__format__', '__getattribute__', '__hash__', '__init__', '__module__', 
'__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', 
'__sizeof__', '__str__', '__subclasshook__', '__weakref__', 
'_dispatch_call', '_get_method_args', '_inspect_call', '_jsonout', 
'_perform_call', '_py_object', '_pylons_log_debug', 'a1', 'a2', 'b1', 
'b2', 'c1', 'index', 'jsontest', 'jsontest2', 'jsontest3', 
'start_response', 'test_abort']

 >>> self.__class__
<class 'helloworld.controllers.world.WorldController'>

However, if *elsewhere* I inherit from BaseController or from anything 
that has _py_object attribute in the interactive debugger, this 
_py_object attribute is missing.

Where does this attribute come from? For the life of me I can't find the 
place in the source that creates this attribute, all the places I could 
find were merely using (or setting) it.

 From what I can read in the source, it seems that most objects in 
Pylons are StackedObjectProxy objects.

I try to get through this rigmarole merely to use @pylons.decorators in 
the code in lib/ directory, because the decorators have to get an object 
with _py_object attr as the first argument (obviously, typically in 
pylons that's 'self').

Regards,
mk


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to