A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-January/012382.html below:

[Python-Dev] Re: Sets: elt in dict, lst.include

[Python-Dev] Re: Sets: elt in dict, lst.include [Python-Dev] Re: Sets: elt in dict, lst.includeSkip Montanaro skip@mojam.com (Skip Montanaro)
Wed, 31 Jan 2001 09:57:30 -0600 (CST)
    Ping>     x is sequence-like if it provides __getitem__() but not keys()

So why does this barf?

    >>> [].__getitem__
    Traceback (most recent call last):
      File "<stdin>", line 1, in ?
    AttributeError: __getitem__

(Obviously, lists *do* understand __getitem__ at some level.  Why isn't it
exposed in the method table?)

Skip



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