[Zope-dev] strange priv leak

Paul Winkler pw_lists@slinkp.com
Wed, 21 May 2003 08:04:23 -0400


On Wed, May 21, 2003 at 06:47:31PM +0300, Steve Alexander wrote:
> 
> >Instances of built-in types do not allow extra attributes (nor should 
> >they.)  So, for example, declarePrivate('some_string_attribute') has no 
> >effect, nor did it ever have any effect.
> 
> We don't need instances of built-in types to allow extra attributes.
> So, no need to say {}.__roles__ = something. What we would need is to be 
> able to say dict.__roles__ = something.

but then all instances would have the same roles.

> It would be nice if the objects that represent built-in types could have 
> attributes set on them. This would be helpful for some things in Zope 3 too.

I dunno. I'm starting to come around and think that it's not that big of
a deal.  One could always just have a publishableDict that subclasses dict.

-- 

Paul Winkler
home:  http://www.slinkp.com
"Muppet Labs, where the future is made - today!"