[Python-ideas] Deprecate dunder functions from operator module
Ethan Furman
ethan at stoneleaf.us
Sat Nov 1 21:02:19 CET 2014
On 10/29/2014 06:38 PM, Ethan Furman wrote:
> On 10/29/2014 05:53 PM, Steven D'Aprano wrote:
>>
>> I propose a few things:
>>
>> * institute a policy that, in the event of a new function being added
>> to the operator module, only the dunderless version will be added;
>>
>> * change the documentation to make it clear that the dunderless
>> versions should be used, rather than merely being "convenience"
>> functions;
>>
>> * add a prominent note that the dunder versions exist for backwards
>> compatibility only and should not be used in new code.
>
> +1
Actually, make that -1.
I'm just crafting some tests to explore how NotImplemented impacts various classes, and the dunder versions make the
whole thing much nicer.
--
~Ethan~
More information about the Python-ideas
mailing list