R. David Murray added the comment:

The python standard library makes extensive use of duck typing.  Duck typing is 
a pretty fundamental part of the design of Python, IMO.  Even the ABC module 
does a bunch of duck typing, rather than requiring strict subclassing or 
registration.

I think the request is valid, and it is mostly a matter of agreeing on the best 
way to identify function ducks.  (I agree that Steven's example is 
intentionally trying to quack like a duck and so is not, IMO, a valid counter 
argument against using __code__).  I doubt we would make such a change in 
anything except a feature release, though. 

Let's see what other devs besides Steven and I think.

----------
nosy: +r.david.murray
type:  -> enhancement
versions:  -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30071>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to