[Python-Dev] Python 3.x and bytes

Stefan Behnel stefan_ml at behnel.de
Thu May 19 12:06:19 CEST 2011


Łukasz Langa, 19.05.2011 11:25:
> Wiadomość napisana przez Stefan Behnel w dniu 2011-05-19, o godz. 10:37:
>
>>> But why wouldn't "they" expect `b'de' + 1` to work as well in this case? If a 1-byte bytes is equivalent to an integer, why not an arbitrary one as well?
>>
>> The result of this must obviously be b"de1".
>
> I hope you're joking.

I "obviously" was. My point is that expectations and "obvious behaviour" 
may not be obvious to everyone.

Nick summed it up very nicely IMHO.

Stefan



More information about the Python-Dev mailing list