Antoine Pitrou added the comment:

> They do have some rather odd behavior when passed to the builtin
> though:
> 
> >>> bytes(10)
> b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
> 
> It would be much more convenient for me if bytes(int) returned the
> ASCIIfication of that int; but honestly, even an error would be better
> than this behavior.  (If I wanted this behavior - which I never have -
> I'd rather it be a classmethod, invoked like "bytes.zeroes(n)".)

I would agree with you, but it's probably too late to change...

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue3982>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to