[Python-Dev] unscriptable? (original) (raw)

Guido van Rossum guido at python.org
Mon Apr 21 06:33:25 CEST 2008


On Sat, Apr 19, 2008 at 6:03 PM, Nick Coghlan <ncoghlan at gmail.com> 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.

I wouldn't bet my life on that. getitem overloading for all sorts of nefarious purposes has quite a following. I'd prefer a message that doesn't get into what x "is" but sticks to the point at hand, which is that it doesn't support getitem.

-- --Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list