471,305 Members | 1,180 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,305 software developers and data experts.

accessing static attributes

hi,

for example an request object ... is request.user the same as
request.__class__.user?

THanks
james

Aug 10 '07 #1
1 1095
On Fri, 10 Aug 2007 02:51:44 -0000, james_027 wrote
hi,

for example an request object ... is request.user the same as
request.__class__.user?
Not in general:
>>class Request(object):
.... user = "somebody"
....
>>request = Request()
request.user == request.__class__.user
True
>>request.user = "nobody"
request.user == request.__class__.user
False

--
Carsten Haese
http://informixdb.sourceforge.net

Aug 10 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Daniel Schüle | last post: by
33 posts views Thread by Chris Capel | last post: by
19 posts views Thread by Mike Ruane-Torr | last post: by
5 posts views Thread by Ren? Paw Christensen | last post: by
2 posts views Thread by Pohihihi | last post: by
reply views Thread by Bill Godsil | last post: by
1 post views Thread by readytoride39 | last post: by
10 posts views Thread by Michael Yanowitz | last post: by
2 posts views Thread by Ramashish Baranwal | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.