Author serhiy.storchaka
Recipients docs@python, mark.dickinson, rhettinger, serhiy.storchaka, tim.peters, willingc
Date 2020-03-30.18:53:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1585594389.99.0.435254403455.issue40046@roundup.psfhosted.org>
In-reply-to
Content
Yes, of course. The PR adds new tests for different types of arguments which currently are accepted (so it would be a regression if they will no accepted in new releases or in alternate implementations) and for types which currently are not accepted for reasons, so unexpected accepting may signal about using inefficient or incorrect algorithm.

For example, choice() works not only with lists, but with other sequences, so the implementation which works only with lists (for example the C implementation which uses the concrete C API) will fail with new tests. If we fix this hypothetical implementation by converting the argument to list (which would be inefficient for large collections), other new tests (which check that sets and iterators are not accepted) will fail.
History
Date User Action Args
2020-03-30 18:53:10serhiy.storchakasetrecipients: + serhiy.storchaka, tim.peters, rhettinger, mark.dickinson, docs@python, willingc
2020-03-30 18:53:09serhiy.storchakasetmessageid: <1585594389.99.0.435254403455.issue40046@roundup.psfhosted.org>
2020-03-30 18:53:09serhiy.storchakalinkissue40046 messages
2020-03-30 18:53:09serhiy.storchakacreate