regex into str

Jeff Epler jepler at unpythonic.net
Sat Aug 28 22:03:46 EDT 2004


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.

Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20040828/ca417286/attachment.sig>


More information about the Python-list mailing list