On Thursday 09 August 2007 19:21:27 Thomas Heller wrote: > Victor Stinner schrieb: > > I prefer str8 which looks to be a good candidate for "frozenbytes" type. > > I love this idea! Leave str8 as it is, maybe extend Python so that it > understands the s"..." literals and we are done.
Hum, today str8 is between bytes and str types. str8 has more methods (eg. lower()) than bytes, its behaviour is different in comparaison (b'a' != 'a' but str8('a') == 'a') and issubclass(str8, basestring) is True. I think that a frozenbytes type is required for backward compatibility (in Python 2.x, "a" is immutable). Eg. use bytes as key for a dictionary (looks to be needed in re and dbm modules). Victor Stinner aka haypo http://hachoir.org/ _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com