[IronPython] bytes behavior on 2.6...

Dino Viehland dinov at microsoft.com
Tue May 5 22:26:29 CEST 2009


We have an active bug against our new bytes implementation for 2.6.  Currently if you do:

b'***'[0]

you get back 42 as an int.  This matches the 3.0 behavior of bytes but in CPython 2.6 you get back '*'.

We could choose to match either form and then we could change it for 3.0.  But because we only have Unicode strings today it seems like we might want to match the 3.0 behavior.  Of course people might write code expecting the 2.6 behavior and they might be explicitly using byte literals as part of migrating to being compatible w/ 3.0.

Does anyone have an opinion on what we should do here?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20090505/39926bad/attachment.html>


More information about the Ironpython-users mailing list