Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
Everything you did not want to know about Unicode in Python 3
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Marko Rauhamaa, post: 5159543"] I actually think the problem has little to do with Unicode. Text is an abstract data type just like any class. If I have an object (say, a subprocess or a dictionary) in memory, I don't expect the object to have any existence independently of the Python virtual machine. I have the same feeling about Py3 strings: they only exist inside the Python virtual machine. An abstract object like a subprocess or dictionary justifies its existence through its behaviour (its quacking). Now, do strings quack or are they silent? I guess if you are writing a word processor they might quack to you. Otherwise, they are just an esoteric storage format. What I'm saying is that strings definitely have an important application in the human interface. However, I feel strings might be overused in the Py3 API. Case in point: are pathnames bytes objects or strings? The linux position is that they are bytes objects. Py3 supports both interpretations seemingly throughout: open(b"/bin/ls") vs open("/bin/ls") os.path.join(b"a", b"b") vs os.path.join("a", "b") Marko [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
Everything you did not want to know about Unicode in Python 3
Top