On Tue, May 31, 2022 at 5:54 AM fjwillemsen--- via Python-ideas <
python-ideas@python.org> wrote:

> I can not think of good reasons why Python array multiplication should not
> throw an error for negative multipliers, because it is meaningless to have
> array multiplication by negative value in the way it is intended in Python.
>

I can think of several reasons, but the big one is "because there is a lot
of production code out there that depends on this behavior."  Maybe if
Python were adding this feature today, the implementers might take your
suggestion to heart and raise on negative length array construction.  But,
it did not and now there is a lot of code that already exists and would
fail if this were changed.  Consider it water under the bridge and move on.

Eric
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/NIK5WPJZVEPLL654ZY6NBH2WFP4I3EOJ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to