Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] Internal representation of strings and Micropython

Paul Sokolovskypmiscml at gmail.com
Thu Jun 5 12:10:39 CEST 2014


Hello,On Wed, 04 Jun 2014 22:15:30 -0400Terry Reedy <tjreedy at udel.edu> wrote:> On 6/4/2014 6:52 PM, Paul Sokolovsky wrote:>> > "Well" is subjective (or should be defined formally based on the> > requirements). With my MicroPython hat on, an implementation which> > receives a string, transcodes it, leading to bigger size, just to> > immediately transcode back and send out - is awful, environment> > unfriendly implementation ;-).>> I am not sure what you concretely mean by 'receive a string', but II (surely) mean an abstract input (as an Input/Output aka I/O)operation.> think you are again batting at a strawman. If you mean 'read from a> file', and all you want to do is read bytes from and write bytes to> external 'files', then there is obviously no need to transcode and> neither Python 2 or 3 make you do so.But most files, network protocols are text-based, and I (and many otherpeople) don't want to artificially use "binary data" type for them,with all attached funny things, like "b" prefix. And then Python2indeed doesn't transcode anything, and Python3 does, without beingasked, and for no good purpose, because in most cases, Input data willbe Output as-is (maybe in byte-boundary-split chunks).So, it all goes in rounds - ignoring the forced-Unicode problem (after aweek of subscription to python-list, half of traffic there appear to bededicated to Unicode-related flames) on python-dev behalf is notgoing to help (Python community).[]-- Best regards, Paul                          mailto:pmiscml at gmail.com


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp