On Thu, May 21, 2020 at 4:02 AM Steven D'Aprano <st...@pearwood.info> wrote:

> On Wed, May 20, 2020 at 06:31:51PM -0700, Christopher Barker wrote:
>
> > I'm still confused why the ternary flag (mode) idea never comes up in
> these
> > arguments -- I know I like that the best. But yeah, I can except that
> it's
> > dead.
>
> Because the standard spelling of flags in ternary logic are True, False,
> and either Unknown or Maybe, and both `zip(*args, strict=Unknown)` and
> `strict=Maybe` are awful.
>

OK, sorry for the imprecise language... I don't hink anyone has suggest
this type of ternary flag, I was using the term incorrectly, as "a flag
that can take three (Or maybe more) values" as there are only three on the
table at the moment.

Let me rephrase ... oh wait, you already did that for me:

I'm still confused why the ternary flag mode idea never comes up in these
arguments -- I know I like that the best. But yeah, I can except that it's
dead.

a *mode* parameter, the modes can be mnemonics for the
> behaviour:
>
>     mode='strict'  # not tolerant of length mismatches
>     mode='shortest'  # stops at the shortest argument;
>     # possible future enhancements
>     mode='longest'  # pads to the longest argument
>     mode='skip'  # skips arguments as they become empty
>     mode='that thing with StopIteration that Soni wants'
>
> The modes wouldn't have to be strings, they could be enums, although we
> might not want them to be builtins.
>

(I seriously doubt anyone would go for them being a builtin enum)

I personally far prefer strings in this kind of situation -- so much easier
than having to find a namespace for the name.

-CHB

-- 
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython
_______________________________________________
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/DNC5TKFPYV5OYZXOCLICD5HNB4NR6JPH/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to