[New-bugs-announce] [issue41251] __future__.barry_as_FLUFL.getMandatoryRelease() is wrong

wyz23x2 report at bugs.python.org
Wed Jul 8 21:59:15 EDT 2020


New submission from wyz23x2 <wyz23x2 at 163.com>:

__future__.barry_as_FLUFL turns x!=y into x<>y.
But the doc by help() says:
Help on _Feature in module __future__ object:                                                                                                                                                                                                               class _Feature(builtins.object)
--snip--
|  getMandatoryRelease(self)                                                                                                  |      Return release in which this feature will become mandatory.                                                            |                                                                                                                             |      This is a 5-tuple, of the same form as sys.version_info, or, if                                                        |      the feature was dropped, is None. 
--snip--

Since <> is dropped, __future__.barry_as_FLUFL.getMandatoryRelease() should be None. But it instead returns (4, 0, 0, 'alpha', 0), which
means it will become default in Python 4 and drop != (!= is invalid
after the __future__ import).
That shouldn't be right.

----------
messages: 373369
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: __future__.barry_as_FLUFL.getMandatoryRelease() is wrong

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41251>
_______________________________________


More information about the New-bugs-announce mailing list