By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,550 Members | 1,189 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,550 IT Pros & Developers. It's quick & easy.

accessing static attributes

P: n/a
hi,

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

THanks
james

Aug 10 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.