[Zope] userFolder that holds user's email
Chris Withers
chris at simplistix.co.uk
Fri Jul 15 12:44:36 EDT 2005
Peter Bengtsson wrote:
> Just one python question Chris, why do you do this::
> class User(BasicUser):
> def __init__(self,dict):
> d['__'] = dict['password']
>
> What's wrong just doing
> self.__ = dict['password']
I'm not looking at the code as I write this, so I may be wrong, but I do
that because, if you look further down, you'll see I define a
__setattr__ hook that raises an exception, since seeing attributes on
object of this type is a really bad thing to do, so you have to go
through lots of hoops if you really want to do it ;-)
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
More information about the Zope
mailing list