On Mon, Sep 30, 2019 at 06:00:44PM +0900, Stephen J. Turnbull wrote:

> Technical questions: does "Subscriptable" mean non-negative ints only,
> or does it include the negative "count from the end" protocol?  How
> about slices?

It means the class defines a __getitem__ method. Like __call__, the 
semantics of that method, and the range of acceptable arguments, is out 
of scope of the ABC.

I don't believe that Python has any way to check the semantics of a 
method call, except to call it and see what it does.


-- 
Steve
(the other one)
_______________________________________________
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/ILP3AH5VBWHCD4GT5QMYFMZ4SWREVQ6B/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to