regex into str
Peter Kleiweg
in.aqua.scribis at nl.invalid
Sun Aug 29 14:06:34 EDT 2004
Diez B. Roggisch schreef:
> Jeff Epler wrote:
>
> > This is intended to be impossible.
> >
> > Even if you could assign to str.__div__ (and this is very deliberately and
> > specifically disallowed) you would end up disappointed, because strings
> > are immutable. That means there's nowhere to store "the last match",
> > no way to mutate the string with the "/=" operator, and also that the
> > interpreter is free to use the same storage for two equal strings.
>
> Another reason for not allowing this is that modifying builtins can lead to
> severe bugs, as other libs might rely on certain functionality. If you
> change that, things start getting very weird....
Programming causes bugs. That's not a reason to disallow programming.
--
Peter Kleiweg L:NL,af,da,de,en,ia,nds,no,sv,(fr,it) S:NL,de,en,(da,ia)
info: http://www.let.rug.nl/~kleiweg/ls.html
More information about the Python-list
mailing list