Dumb python questions

Alex Martelli aleaxit at yahoo.com
Thu Aug 16 16:52:54 EDT 2001


"Andrew Dalke" <dalke at acm.org> wrote in message
news:9lfq7c$kn0$1 at slb5.atl.mindspring.net...
> Paul Rubin:
> >Python seems to be in a somewhat dangerous phase of development right
> >now, where a lot of the design still isn't worked out, but lots of
> >people are using it, which means any mistakes made are hard to undo
> >because people's code will break.  Instead, kludges get tacked on,
> >potentially resulting in an eventual Perl-like monstrosity
>
> Huh?  "right now?"  There's almost nothing being dicussed except
> for '/' which will break even 5+ year old code.  The new keyword,

Hmmm -- it looks to me we were VERY close to a BDFL pronouncement
that assignment to aninstance.__class__ was going away, and that by
default classes were going to be unmodifiable -- both for performance
reasons, and to protect 'typical users' from themselves -- and it may
yet happen, of course.  "dangerous" seems an apt adjective here.

> used.  The "print >>" trick (yes Alex, I know you don't like it :)
> doesn't break existing code.

No, but if and when __class__ can't be modified any more, and a
class object can only be modified if it sets __dynamic__ to 1
explicitly, then existing code would break.  (That WOULD be done
gradually -- at first only for new classes, descendants of object --
"classic classes" would only disappear in Python 3.0).


Alex






More information about the Python-list mailing list