[Python-ideas] Changing the meaning of bool.__invert__
ian.g.kelly at gmail.com
Sat Apr 9 12:07:16 EDT 2016
On Sat, Apr 9, 2016 at 9:25 AM, Steven D'Aprano <steve at pearwood.info> wrote:
> On Sat, Apr 09, 2016 at 08:28:10AM -0600, Ian Kelly wrote:
>> It seems unusual to deprecate something without also providing a means
>> of using the new thing in the same release. "Don't use this feature
>> because we're going to change what it does in the future. Oh, you want
>> to use the new version? Psych! We haven't actually done anything yet.
>> Use not instead." It creates a weird void in Python 3.6 where the
>> operator still exists but absolutely nobody has a legitimate reason to
>> be using it.
> Not really. This is quite similar to what happened in Python 2.3 during
> int/long unification. The behaviour of certain integer operations
> changed, including the meaning of some literals, and warnings were
Pointing out that this has been done once before, 11 minor releases
prior, does not dissuade me from continuing to characterize it as
"unusual". The int/long unification was also a much more visible
>> What happens if somebody is using ~ for its current semantics, skips
>> the 3.6 release in their upgrade path, and doesn't read the release
>> notes carefully enough? They'll never see the warning and will just
>> experience a silent and difficult-to-diagnose breakage.
> Then they'll be in the same position as everybody if there's no
> depreciation at all.
I'm not suggesting there should be no deprecation. I'm just
questioning whether the proposed deprecation is sufficient.
More information about the Python-ideas