This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kevinbhendricks
Recipients kevinbhendricks, r.david.murray
Date 2014-10-03.21:20:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412371215.13.0.202297220142.issue22549@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for letting me know this was expected behaviour.  I see the same "issue" holds true while using:

for c in b'0123456789':
   print(ord(c))
 
I ended up using slices nearly everyplace.  Still ran into iterator issues.  Horrible hack really.  

I think I will spend some time reading the python dev archives to figure out how anyone could defend this approach.

FWIW, introducing a bytes class that works exactly like byte (non-unicode strings) in python 2.X but disallowing any automatic up-conversion to full unicode (like during concatenation), would have been a useful step.  

I work on decoding binary formatted ebook files all of the time, and python 3's second class treatment of bytes makes no sense to me.  Perfectly valid code can be written using only utf-8 and latin-1 encoded bytestrings with no need to upconvert to anything.  It is practically impossible to support code like that in Python 3.

Boggles the mind.

Thanks again for the fast response.

Kevin
History
Date User Action Args
2014-10-03 21:20:15kevinbhendrickssetrecipients: + kevinbhendricks, r.david.murray
2014-10-03 21:20:15kevinbhendrickssetmessageid: <1412371215.13.0.202297220142.issue22549@psf.upfronthosting.co.za>
2014-10-03 21:20:15kevinbhendrickslinkissue22549 messages
2014-10-03 21:20:14kevinbhendrickscreate