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/2014-June/134970.html below:

[Python-Dev] namedtuple implementation grumble

[Python-Dev] namedtuple implementation grumble [Python-Dev] namedtuple implementation grumbleAntoine Pitrou antoine at python.org
Mon Jun 9 01:32:11 CEST 2014
Le 08/06/2014 18:44, R. David Murray a écrit :
>
> For what it is worth, I found the discussion I was remembering:
>
>      http://bugs.python.org/issue7796
>
> And as someone pointed out down thread, the actual check is "inherits
> from tuple and has a _fields attribute".
>
> That gets you a duck type, which is generally what you want in Python.

I think it's a bit complicated (and not obviously discoverable) as far 
as duck-typing goes.

Regards

Antoine.


More information about the Python-Dev mailing list

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