Greg Ewing wrote: > Guido van Rossum wrote: > >> That would imply that b"..." should return a mutable bytes object, >> which many people have objected to. >> > > I'm still very uncomfortable about this. It's so > completely unlike anything else in the language. > I have a strong feeling that it is going to trip > people up a lot, and end up being one of the > Famous Warts To Be Fixed In Py4k. > > There's some evidence of this already in the way > we're referring to it as a "bytes literal", when > it's *not* actually a literal, but a constructor. > Or at least it's a literal with an implied > construction operation around it. >
Not only that, but it's the only *string prefix* that causes the interpreter to create and return a mutable object. It's not too late to go with Talin's suggestions (bytes = immutable, buffer = mutable), is it? I got warm fuzzies reading that. Neil _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
