Author veky
Recipients Zero, docs@python, r.david.murray, terry.reedy, veky
Date 2017-07-17.13:05:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Of course. The Deceptive class was just reductio ad absurdum. I'm all for believing the class through what attributes does it expose. We agree there.

Where we don't agree, is _what_ attributes constitute the iteration protocol. You, the source code and the documentation of the say one thing (__iter__), while I, the current version of Python (at least CPython, but I think other implementations do the same) and the glossary say another thing (__iter__ or __getitem__).

[It's not the only protocol consisting of two attributes... e.g. bool protocol also consists of two attributes, __bool__ and __len__ (though it is not optional, so we don't have]

You seem to say that only the glossary needs fixing. But then we'll be in an even more weird position, where we must say some objects can be iterated, but are not iterables. I'm pretty sure you don't want that. The whole point of "Xable" words (e.g. "callable", as opposed to "function") is that it encompasses everything that can be Xed, not only the first thing that comes to mind (e.g. classes can also be called).

Or are you saying that after the glossary is fixed, then we should fix Python by (at least deprecating, if not) forbidding __getitem__ iteration? I'm not sure that this is the consensus. Are you?
Date User Action Args
2017-07-17 13:05:27vekysetrecipients: + veky, terry.reedy, r.david.murray, Zero, docs@python
2017-07-17 13:05:27vekysetmessageid: <>
2017-07-17 13:05:27vekylinkissue18558 messages
2017-07-17 13:05:26vekycreate