[Patches] UserDict/UserList: raise TypeError when trying to set attrs

Gerrit Holl Gerrit <gerrit@nl.linux.org>
Mon, 14 Feb 2000 20:40:05 +0100


Hello,

Moshe Zadka wrote on 950553454:
> On Mon, 14 Feb 2000, Gerrit Holl wrote:
> 
> > Hello Python gurus,
> > 
> > I added a __setattr__ to UserDict and UserList. When trying to set
> > attributes to dictionairies and lists, an error is raised. In
> > UserDict and UserList, that's not true:
> 
> I'm certain I'm against this patch: it would make deriving from UserDict
> (e.g.) that much harder, by needing to override __setattr__ for any
> new attributes you'd want to add.
> 
> My 0.02$

I don't know why one would do that but... OK, thanks for answering!

Hmm, if subclassing standard objects will eventually be implemented, I
wonder how this would be done...

regards,
Gerrit.

-- 
Homepage: http://www.nl.linux.org/~gerrit
-----BEGIN GEEK CODE BLOCK----- http://www.geekcode.com
Version: 3.12
GCS dpu s-:-- a14 C++++>$ UL++ P--- L+++ E--- W++ N o? K? w--- !O
!M !V PS+ PE? Y? PGP-- t- 5? X? R- tv- b+(++) DI D+ G++ !e !r !y
-----END GEEK CODE BLOCK----- moc.edockeeg.www//:ptth