[Python-ideas] Fixing the Python 3 bytes constructor

Eric Snow ericsnowcurrently at gmail.com
Fri Mar 28 17:34:20 CET 2014


On Mar 28, 2014 5:01 AM, "Nick Coghlan" <ncoghlan at gmail.com> wrote:
> If I could consistently remember whether to include the "e" or not,
> "zeroes" would be my preference as well, but almost every time I go to
> type it, I have to pause...

However, it reads better, which trumps the possible minor spelling
inconvenience. (all else equal, readability trumps write-ability, etc.)

> It's actually in the proposal solely because "bytes(x)" already works
> that way, and "this is deprecated, use bytes.allnull instead" is a
> much easier deprecation to sell.

Fair point, though I also agree with Steven here.  Could the replacement
(b'\0'*x) be a doc note instead of a new method?

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140328/3ca290ec/attachment.html>


More information about the Python-ideas mailing list