On Wed, Jun 24, 2020 at 10:11 AM Guido van Rossum <gu...@python.org> wrote: > > On Tue, Jun 23, 2020 at 4:41 PM MRAB <pyt...@mrabarnett.plus.com> wrote: >> >> On 2020-06-23 22:50, Barry Warsaw wrote: >> > On Jun 23, 2020, at 14:31, Chris Angelico <ros...@gmail.com> wrote: >> > >> >> I can't find it among the rejected alternatives, but was it considered >> >> to use "..." as the wildcard, rather than "_"? It carries similar >> >> meaning but its special case of "this will never be bound" is simply >> >> preventing an error, rather than making one otherwise-valid name >> >> special. >> > >> > I thought of that too as I was reading the PEP, but forgot to add it to my >> > notes. I do like ellipsis more than underscore here. >> > >> +1 > > > The problem is that ellipsis already has a number of other meanings, *and* is > easily confused in examples and documentation with leaving things out that > should be obvious or uninteresting. Also, if I saw [a, ..., z] in a pattern I > would probably guess that it meant "any sequence of length > 2, and capture > the first and last element" rather than "a sequence of length three, and > capture the first and third elements". (The first meaning is currently > spelled as [a, *_, z].) >
Ah, yes, very good point. Agreed. ChrisA _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/QTB6GLWLB3BZU3I2PWF7TML73HF4LYRZ/ Code of Conduct: http://python.org/psf/codeofconduct/