[Python-Dev] namedtuple implementation grumble
Antoine Pitrou
antoine at python.org
Mon Jun 9 01:32:11 CEST 2014
More information about the Python-Dev mailing list
Mon Jun 9 01:32:11 CEST 2014
- Previous message: [Python-Dev] namedtuple implementation grumble
- Next message: [Python-Dev] namedtuple implementation grumble
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Previous message: [Python-Dev] namedtuple implementation grumble
- Next message: [Python-Dev] namedtuple implementation grumble
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list