On 2007-05-04 19:51, Guido van Rossum wrote: > [-python-dev] > > On 5/4/07, Fred L. Drake, Jr. <fdrake at acm.org> wrote: >> On Friday 04 May 2007, M.-A. Lemburg wrote: >> > I also suggest making all bytes literals immutable to avoid running >> > into any issues like the above. >> >> +1 from me. > > Rather than adding immutability to bytes objects (which has big > implementation and type checking implications), consider using > buffer(b"123") as an immutable bytes literal. You can freely > concatenate and compare buffer objects with bytes objects. I like Georg's idea of having an immutable bytes subclass. b"abc" could then be a shortcut constructor for this subclass. In general, I don't think it's a good idea to have literals turn into mutable objects, since literals are normally perceived as being constant. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2007) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4