On Dec 19, 2007 4:58 AM, Max Ischenko <[EMAIL PROTECTED]> wrote:
>
>
>
> On 12/18/07, Jonathan LaCour <[EMAIL PROTECTED]> wrote:
> > I hadn't thought of any of this before, but I really like the concept.
> > It seems to me that `context` is certainly better than `c` but you
> > are right that it doesn't really convey the fact that its essentially
> > request local state.  My personal preference, after hearing your ideas,
> > would be:
> >
> >      pylons.c       -> pylons.request.state
> >      pylons.session -> pylons.request.session
> >      pylons.g       -> pylons.request.app_globals
>
>  I don't see how this is better than 'pylons.app_globals' and  so on.
>  Unless...right: the "stupid user" won't be able to do "dirty trick" like
> "from pylons.request import app_globals" since pylons.request is some weird
> thing and not a python module. Er?
>
>  And while we're on a "house cleaning" topic, I had read somewhere that
> "globals (singletons) are a design smell". If that's true what was the point
> of making request and response "globals"???
>
>  I must be seeing all this in a different light, so sorry for sarcasm. I
> don't like "changes for the sake of changes" and I don't like "we know
> better than the user" either.

There are three arguments, not all made by the same people.

1) 1-letter variables are bad because they're not self-documenting.
Ben and some others are pushing this,

2) "import *" is ugly, do anything to get rid of it.  Ben has proposed
reducing imports
to the minimum necessary.  Some of the other imports may survive as comments.
Ian and I have proposed importing the base module as 'base'.  Ben and
some others are pushing this.

3) Mimimize StackedObjectProxies.  That's the only reason for moving pylons.* .
Ben has not acknowledged this as a problem.  But I and others think
they're fragile and
hard to understand, and thus make Pylons hard to understand.  (Which
was Ben's motivation
for (1) and (2).)  Some have suggested moving them onto a single SOP
as attributes.
Ian suggested putting them all on 'request', which by definition is
request-local information.
(Whether some of the information persists beyond the request is a
different question.)

-- 
Mike Orr <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-devel" 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-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to