Quoth Jonathan LaCour (2007-12-19 06:54):
>      pylons.c       -> pylons.request.state
>      pylons.session -> pylons.request.session
>      pylons.g       -> pylons.request.app_globals

Excuse my ignorance, but why can't all these just be attributes of
the controller instance?  An abstract base class provides
properties to subclasses.  The controller is instantiated per
request, so is already thread-local.  It can then be passed around
as context to library methods instead of this fixation with
module-globals.

I thought the reasoning for ultra-short names is because of the
tedium of passing context to the template namespace, but if you
use the controller you could just pass it as 'this' or somesuch,
and then merrily reference this.var, this.request, this.session,
and even this.globals!

a.

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

Reply via email to