Ben Finney wrote:
My point was rather meant to imply that subclassing the built-in (immutable) string types was the best way to usefully get all their functionality
However, it would be difficult to do that without changing all C code that deals with strings, including that in extension modules. That's because the existing string type stores the characters in the string object itself. A mutable variant would have to contain a pointer to a resizable memory block, and therefore couldn't be used as a drop-in replacement by existing C code that expects a string. -- Greg -- http://mail.python.org/mailman/listinfo/python-list