durusmail: quixote-users: Why class 'Session' has no method get_user() ?
Why class 'Session' has no method get_user() ?
2005-03-17
2005-03-17
2005-03-17
2005-03-17
2005-03-17
Why class 'Session' has no method get_user() ?
2005-03-17
Why class 'Session' has no method get_user() ?
2005-03-17
2005-03-17
2005-03-17
2005-03-17
2005-03-17
2005-03-17
Why class 'Session' has no method get_user() ?
Why class 'Session' has no method get_user() ?
Why class 'Session' has no method get_user() ?
2005-03-18
Why class 'Session' has no method get_user() ?
2005-03-18
Why class 'Session' has no method get_user() ?
2005-03-18
Why class 'Session' has no method get_user() ?
2005-03-18
Why class 'Session' has no method get_user() ?
"Template" components. Was: Why class 'Session' has no method get_user()?
2005-03-19
"Template" components. Was: Why class 'Session' has no method get_user()?
2005-03-19
Why class 'Session' has no method get_user() ?
2005-03-17
2005-03-17
2005-03-17
2005-03-17
2005-03-17
2005-03-17
Why class 'Session' has no method get_user() ?
David Binger
2005-03-17
On Mar 17, 2005, at 12:19 PM, Mike Orr wrote:
>
> Grr, gratuitous accessor functions get my goat.  This is Python, not
> Java.  We have properties in case an attribute setting needs
> validation.  (Another reason to make all classes new-style...)
> There's already quixote.get_user() if you reeeeally want to use a
> function.  I thought .set_user() was a method because of the
> significance it had for the application.
>

Wait a minute.  It is reasonable to thing that code accessing sessions,
say to list them all, might want to access the user (in a way that could
be specialized if necessary, by a subclass).  quixote.get_user() doesn't
do that.

And while properties are helpful in cases where you have no alternative,
they seem to me to be gratuitous alternative syntax for method calls.

> +0.5 for making Session dictionary-like though.  No reason to
> arbitrarily limit its usability.

So you want accessor, setter, and support for persistence, for
information not
needed by quixote and maybe not by an application.  I thought you
didn't like
gratuitous code. ;)


reply