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/2006-February/061597.html below:

[Python-Dev] defaultdict proposal round three

[Python-Dev] defaultdict proposal round three [Python-Dev] defaultdict proposal round threeFuzzyman fuzzyman at voidspace.org.uk
Tue Feb 21 11:17:52 CET 2006
Greg Ewing wrote:

>Delaney, Timothy (Tim) wrote:
>
>  
>
>>However, *because* Python uses duck typing, I tend to feel that
>>subclasses in Python *should* be drop-in replacements.
>>    
>>
>
>Duck-typing means that the only reliable way to
>assess whether two types are sufficiently compatible
>for some purpose is to consult the documentation --
>you can't just look at the base class list.
>
>  
>
What's the API for that ?

I've had problems in code that needs to treat strings, lists and
dictionaries differently (assigning values to a container where all
three need different handling) and telling the difference but allowing
duck typing is *problematic*.

Slightly-off-topic'ly-yours,

Michael Foord

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