classification
Title: typo in operator.isCallable deprecation warning
Type: Stage:
Components: Documentation Versions: Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, kennethd
Priority: normal Keywords:

Created on 2010-02-16 18:20 by kennethd, last changed 2010-02-16 20:58 by georg.brandl. This issue is now closed.

Messages (2)
msg99433 - (view) Author: kenneth dombrowski (kennethd) Date: 2010-02-16 18:20
The operator documentation @ http://docs.python.org/library/operator.html states for operator.isCallable(obj): "Deprecated since version 2.0: Use isinstance(x, collections.Callable) instead.", I believe this should read since version 2.6

kenneth@dev2 ~ $ python
Python 2.5.4 (r254:67916, Oct  3 2009, 21:36:21)
[GCC 3.4.6 [FreeBSD] 20060305] on freebsd6
Type "help", "copyright", "credits" or "license" for more information.

>>> import collections
>>> collections.Callable
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Callable'
msg99440 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-02-16 20:58
No, this is correct.  isCallable() was deprecated since 2.0, but the replacement was the builtin callable() until 2.6.
History
Date User Action Args
2010-02-16 20:58:31georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg99440
2010-02-16 18:20:19kennethdcreate