On Sun, 20 Feb 2005 15:01:09 +0100, Martin v. Löwis <[EMAIL PROTECTED]> wrote:

Nick Coghlan wrote:
Having "", u"", and r"" be immutable, while b"" was mutable would seem rather inconsistent.

Yes. However, this inconsistency might be desirable. It would, of course, mean that the literal cannot be a singleton. Instead, it has
to be a display (?), similar to list or dict displays: each execution
of the byte string literal creates a new object.


An alternative would be to have "bytestr" be the immutable type corresponding to the current str (with b"" literals producing bytestr's), while reserving the "bytes" name for a mutable byte sequence.

Indeed. This maze of options has caused the process to get stuck. People also argue that with such an approach, we could as well tell users to use array.array for the mutable type. But then, people complain that it doesn't have all the library support that strings have.

The main point being, the replacement for 'str' needs to be immutable or the upgrade process is going to be a serious PITA.

Somebody really needs to take this in his hands, completing the PEP, writing a patch, checking applications to find out what breaks.

Regards,
Martin

What is the processing of getting a PEP work out? Does the work and discussion carry out in the python-dev mailing list? I would be glad to help out especially on this particular issue.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to