[IronPython] bytes behavior on 2.6...

Michael Foord fuzzyman at voidspace.org.uk
Tue May 5 23:49:59 CEST 2009


Dino Viehland wrote:
>
> 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?
>

Personally I think if you are targeting compatibility with Python 2.6 
then you should be compatible with Python 2.6...

I'm still hoping you will relent and maintain an IronPython 2.X branch 
as long as Python 2.X is being developed...

Michael

> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>   


-- 
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog





More information about the Ironpython-users mailing list