On Sun, May 17, 2020 at 12:22 PM Nathan Schneider <neatn...@gmail.com>
wrote:

> Let me attempt a metaphor, which won't be perfect but may help:
>
> The safety one gets from strictness is a bit like driving a car wearing a
> seat belt. It is not fundamentally different from driving a car without a
> seat belt, and in most cases you hope the seat belt will not come into
> play. But it is a precaution that is worth taking in *most* circumstances
> (not all, e.g. for infants a standard seat belt won't work).
>

That's a really terrible analogy. :-(

I never drive without a seat belt.  And a never want the seat belt to
actually matter, of course.  Everyone who want a zip_strict behavior
(including me) wants to be able either to catch the exception explicitly or
to have the program fail-fast/fail-hard because of it.

In contrast, as I've said, more than half of the times that *I* use zip()
it would be BROKEN by using zip_strict() instead (or zip(..., strict=True),
or whichever spelling).  Raising an exception for something I want to
succeed, and I want to work exactly as it does (e.g. leave some iterators
unconsumed) is not a "harmless safety precaution".

If you want a better metaphor: Some door handles include locks, others do
not.  "Strict" ones have locks.  So yes, it's possible to leave the lock in
the unlocked position, and then it functions pretty much the same as one
without a lock.  But likewise, it's possible to leave the door in the
locked position when you don't have the key on you, and you face a
significant inconvenience that serves no purpose.

I have some doors with locks, and some other doors without locks.  I have
both for a good reason, but the reasons are different, and depend on
various things like whether a particular room is private or contains
valuables.  In truth though, I don't lock my outside doors because I live
in a community of "consenting adults" (occasionally I do lock the bathroom
door for privacy, for a short while... no-locks is definitely strongly my
default mode, as is no-strict when I zip).


> --
>
The dead increasingly dominate and strangle both the living and the
not-yet born.  Vampiric capital and undead corporate persons abuse
the lives and control the thoughts of homo faber. Ideas, once born,
become abortifacients against new conceptions.
_______________________________________________
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/FQHSMQO6URCXGBPNIMD4NW2EW33LNR7R/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to