On 13/12/19 9:59 am, Steven D'Aprano wrote:
So a[] would be:

     temp =   # A syntax error.
     a[temp]

not an empty tuple.

That's the way it is now, but it doesn't have to be that way.

There is some logic to the proposal. Currently the argument
passed to __getitem__ is what you would get by replacing the
square brackets with round ones -- *except* in the case of
no arguments.

--
Greg
_______________________________________________
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/OGSSY6Y6WPISFKJM3OG7VTVAL5CJDBPU/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to