[issue40353] Add an optional "strict" check to zip

2020-06-17 Thread Brandt Bucher
Brandt Bucher added the comment: Looks like two issues were created. I'm going to close this one in favor of 40636, which has PRs attached and is specific to PEP 618. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Provide a strict form of zip

[issue40353] Add an optional "strict" check to zip

2020-04-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: > independent class Oops, sorry I mean independent implementation. -- ___ Python tracker ___

[issue40353] Add an optional "strict" check to zip

2020-04-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: I don't think this is needed in the builtin zip at all. I think that there is no consensus on Python-Ideas that this is needed or desirable. I especially don't think the API should be a keyword flag on zip. Flag arguments which change the behaviour of

[issue40353] Add an optional "strict" check to zip

2020-04-21 Thread Brandt Bucher
Brandt Bucher added the comment: Slight edit: if the shortest iterator is "first", one additional item will have to be drawn from the next non-exhausted iterator. I missed that, initially. > It would be better to implement it as a separate function. I disagree. It's not intrusive here; I

[issue40353] Add an optional "strict" check to zip

2020-04-21 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40353] Add an optional "strict" check to zip

2020-04-21 Thread Ram Rachum
Ram Rachum added the comment: Here are the tests I made: https://github.com/cool-RR/cpython/commit/766409748a107f290997b0cfab5aa19d0c2888e5 -- ___ Python tracker ___

[issue40353] Add an optional "strict" check to zip

2020-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Also you can just get a ready implementation from more-tertools. -- ___ Python tracker ___ ___

[issue40353] Add an optional "strict" check to zip

2020-04-21 Thread Brandt Bucher
New submission from Brandt Bucher : As discussed on Python-ideas: https://mail.python.org/archives/list/python-id...@python.org/thread/6GFUADSQ5JTF7W7OGWF7XF2NH2XUTUQM/ When a keyword-only argument "strict=True" is passed to zip's constructor, a ValueError will be raised in the case where

[issue40353] Add an optional "strict" check to zip

2020-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It would be better to implement it as a separate function. -- nosy: +serhiy.storchaka ___ Python tracker ___