>> 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. > > Does that mean you want list literals to be immutable too? > > lst = ['a', 'b', 'c'] > lst.append('d') # raises an error? That's not a literal, it's a display. The difference is that a literal denotes the same object every time it is executed. A display creates a new object every time it is executed. (another difference is that a display is a constructed thing which may contain runtime-computed components, unlike a literal). So if bytes are mutable and also have source-level representation, they should be displays, not literals. Regards, Martin
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