
On Fri, May 15, 2020 at 09:56:03AM -0400, Paul Ganssle wrote:
I'm on the fence about using a separate function vs. a keyword argument (I think there is merit to both), but one thing to note about the separate function suggestion is that it makes it easier to write backwards compatible code that doesn't rely on version checking. With `itertools.zip_strict`, you can do some graceful degradation like so:
try: from itertools import zip_strict except ImportError: zip_strict = zip
This is just a special case of a much broader case: a separate function, or method, is a first class object that can be passed around to other functions, used in lists, etc. https://softwareengineering.stackexchange.com/questions/39742/when-is-a-feat... Using a mode switch or flag makes the zip strict a second class citizen. -- Steven