Nick Coghlan wrote: [...]> > To suggest yet another colour for the bikeshed, maybe we should ditch > both unindexable and unsubscriptable and go with "'int' is not a > sequence or mapping". Any object which supports subscript notation will > be one or the other. > All the object needs to to to be "indexable" or "subscriptable" is to implement .__index__() or .__getitem__(). While sequences and mappings are the only built-in types to do so, this says nothing about user-defined types. Couldn't we find a more obvious and direct error message like "Illegal use of [] subscripting/indexing"? one-more-coat-for-the-bikeshed-ly y'rs - steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4