durusmail: quixote-users: _q_exports and class instances
_q_exports and class instances
Daniel Potter (Ars Analytica)
2004-03-12
Using _q_exports certainly works.  I just wanted to
know if there was another solution.  Since I am new to
both Python and Quixote, I was worried I was missing
something wrt to how one commonly uses object
instances.

--- "A.M. Kuchling"  wrote:
> On Fri, Mar 12, 2004 at 07:59:53AM -0800, Daniel
> Potter (Ars Analytica) wrote:
> > The common approach seems to be to *not* use
> > _q_exports but rather to use _q_lookup to return a
> > fresh someclass instance.
>
> Correct; something like this:
>
> _q_exports = []
>
> def _q_lookup (request, component):
>     if component == 'someclassinstance':
>         return someclass('foo')
>
> Why isn't this solution acceptable for your
> requirements?
>
> --amk
>
> _______________________________________________
> Quixote-users mailing list
> Quixote-users@mems-exchange.org
>
http://mail.mems-exchange.org/mailman/listinfo/quixote-users





reply