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/2002-March/021991.html below:

[Python-Dev] Evil isinstance()

[Python-Dev] Evil isinstance() [Python-Dev] Evil isinstance()Samuele Pedroni pedroni@inf.ethz.ch
Sat, 30 Mar 2002 18:20:37 +0100
From: Aahz <aahz@pythoncraft.com>
> 
> The problem is that in some cases the __init__ for a class needs to
> dispatch based on the type of the operand.  For example, int() takes
> both numbers and strings.  What should we recommend as "standard
> practice" for this issue if isinstance() is disrecommended?

PEP 246 (?) <wink>

PS: I had a very heated discussion with Alex Martelli on anygui-devel
whether the PEP is ready for prime time, and whether
wrapping is so generally harmless, but I think
at some point the PEP should nevertheless be seriously discussed.
Likely the Zope3 people have some real data/experience
on adaptation to share.
PPS: it should be noted that the PEP does *not*
require first class interfaces  to be adopted.
Those are an orthogonal issue.





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