Mike Orr wrote: > 'c' -- as well as the other context globals (request, response, > session, cache, app_globals, and config) -- are StackedObjectProxy > objects. This allows multiple instances of Pylons applications to > exist in the same process and share the module globals. With > StackedObjectProxy, 'c' is the proxy object, and 'c._current_obj()' is > the actual value that was pushed onto it. Normally the proxy calls > .._current_obj() behind the scenes so you don't have to, but in certain > cases it doesn't. 'c.hasattr' doesn't; that's why you're getting the > proxy object instead. 'dir(c)' also doesn't, so you have to call > 'dir(c._current_obj())' if you want to know which attributes have been > set. I suppose you could say that dict access is transparent while > method calls aren't, but that may not cover all the cases.
Ha. That does it as explanation. Thanks. 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 -~----------~----~----~----~------~----~------~--~---
