On Wed, Dec 23, 2020 at 11:16 PM Brandt Bucher <[email protected]>
wrote:

> I didn't participate in the mailing list discussions for PEP 637, but I
> have become somewhat involved in the reference implementation and final
> revisions. While reviewing the PEP, I noticed what I think is a missed
> opportunity to finally allow empty subscripting (`obj[]`). It seems to me
> to be a natural consequence of the `obj[*a]` and `obj[**k]` syntax which
> the PEP proposes, and I'm quite surprised that the PEP still outlaws it
> (the latest revision has language that says we're punting on this, but I'd
> like to change that).
>

I'm -0.5 on allowing that now.

There was SOME discussion of this in the long threads, but not any strong
consensus as I read it.

However, it has no clear use *outside of type hints*, and hence is a slight
invitation to abuse or misunderstanding.  I would rather it be its own
proposal, or part of some more general proposal around type hints.  Not
allowing the empty subscript in the initial implementation does not
preclude allowing it later when it has an actual use case that has been
presented a bit more formally than in this email.


-- 
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 -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/FPMZZ4WEF6Q53RGLXFV5PALXPR2K3ZW7/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to