This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paddy3118
Recipients benjamin.peterson, georg.brandl, paddy3118
Date 2008-07-02.05:27:07
SpamBayes Score 5.9088987e-05
Marked as misclassified No
Message-id <1214976432.91.0.297441007011.issue3214@psf.upfronthosting.co.za>
In-reply-to
Content
Hi Georg,
A bit of relevant background about me: 
  I've been interested in Duck Typing _specifically_ for a couple of
years when I started watching edits to it on Wikipedia. I researched the
history of the use of the term and changed the attribution of first use
to Alex Martelli after digging in Google, and still trawl reading code
and articles on the subject. But I DONT think this makes me an expert -
Duck typing is a 'mould-able' term and the things we write about it help
to define it.

On your comment about hasattr:
  I think more and more that Duck-Typing is what allows us, (as in
Python), to substitute one class for another in a method previously
designed with only the other in mind - you know, as in the canonical
example of file-like objects such as StringIO substituting in methods
defined originally for files. In this case hasattr checks don't add
anything, and EAFP is all important.

I tried to get wider context on this by posting it originally to
comp.lang.python but no one was interested. I don't normally frequent
the developers forumbut maybe we should open the issue to that audience?

- Paddy.
History
Date User Action Args
2008-07-02 05:27:13paddy3118setspambayes_score: 5.9089e-05 -> 5.9088987e-05
recipients: + paddy3118, georg.brandl, benjamin.peterson
2008-07-02 05:27:12paddy3118setspambayes_score: 5.9089e-05 -> 5.9089e-05
messageid: <1214976432.91.0.297441007011.issue3214@psf.upfronthosting.co.za>
2008-07-02 05:27:11paddy3118linkissue3214 messages
2008-07-02 05:27:10paddy3118create