[New-bugs-announce] [issue6119] Confusing DeprecationWarning
Alejandro
report at bugs.python.org
Tue May 26 23:24:01 CEST 2009
New submission from Alejandro <alejolp at alejolp.com>:
Comparing a lambda and a built-in by equality ("==") raises a
DeprecationWarning when the "-3" flag is used on Python 2.6.2:
$ python2.6 -3
Python 2.6.2 (r262:71600, Apr 28 2009, 16:17:29)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> (lambda x: x) == eval
__main__:1: DeprecationWarning: builtin_function_or_method inequality
comparisons not supported in 3.x
False
On Python 3.0.1 it works just fine:
$ python3.0
Python 3.0.1 (r301:69556, Apr 28 2009, 19:47:09)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> (lambda x: x) == eval
False
>>>
----------
components: Interpreter Core
messages: 88394
nosy: alejolp
severity: normal
status: open
title: Confusing DeprecationWarning
versions: Python 2.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6119>
_______________________________________
More information about the New-bugs-announce
mailing list