
June 18, 2020
2:59 p.m.
17.06.20 11:42, Victor Stinner пише:
zip(strict=True) should help to write more reliable code. Maybe it's time to review stdlib code to check if some functions would deserve the addition of strict=True? I had a look and found a few suspicious usage of zip(). But I'm not sure if we want to make these functions stricter.
I did have such plan: 1. Add the zip_equal() builtin and replace all calls of zip() with zip_equal(). 2. Run tests and revert zip_equal() back to zip() until tests pass. 3. Manually review all remaining zip_equal() and left only these which are absolutely correct. 4. Replace zip_equal() with zip(strict=True). It would be easier if add a new function instead of a new keyword argument to the existing function.