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/2008-March/078285.html below:

[Python-Dev] Removing callable() from the stdlib

[Python-Dev] Removing callable() from the stdlib [Python-Dev] Removing callable() from the stdlibCollin Winter collinw at gmail.com
Fri Mar 28 18:51:15 CET 2008
I've been running 2to3's fix_callable over 2.6's stdlib to remove -3
warnings due to callable() usage; 2to3 replaces callable(x) with
has_attr(x, "__call__"). Unfortunately, this breaks code that wants to
run callable() on old-style classes (like test_builtin), because
old-style classes don't have a __call__ attribute (new-style classes
do, however).

How should this be handled? I'm tempted to just add __call__ to
old-style classes for 2.6, but Neal Norwitz thought that might break
some user code. Any other thoughts?

Collin Winter
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