Serhiy Storchaka added the comment:

I'm not convinced that the zeros() method is needed. Zero-initialized sequences 
can be created via sequence repetition. Sorry, but arguments against this sound 
like "we made bad design decision in the past, let repeat it with new name" to 
me.

In any case if you want to write a code for different Python versions you 
should use sequence repetition.

Here is a patch that replaces all creations of zero-initialized bytes and 
bytearray objects in the stdlib and tests with repetitions. All tests (except 
test_bytes of course) are passed on Linux if disallow an int argument in bytes 
and bytearray constructors.

----------
nosy: +serhiy.storchaka
Added file: http://bugs.python.org/file44329/no_bytes_from_int.patch

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

Reply via email to