Re: [Python-ideas] Discourage operator.__dunder__ functions

2017-04-27 Thread Sven R. Kunze
On 13.04.2017 20:20, Steven D'Aprano wrote: - And finally, I fail to see how having to type an extra four characters is a "convenience". Just for the sake of completeness: Re-usage of names is always a convenience. Developers can use a string variable to access dynamically both the real

Re: [Python-ideas] Discourage operator.__dunder__ functions

2017-04-19 Thread Todd
On Apr 13, 2017 14:25, "Steven D'Aprano" wrote: Notice that I said *discourage* rather than *deprecate*. Quoting the documentation: The operator module exports a set of efficient functions corresponding to the intrinsic operators of Python. For example,

Re: [Python-ideas] Discourage operator.__dunder__ functions

2017-04-18 Thread Sanket Dasgupta
Hi, I have opened a pull request at https://github.com/python/cpython/pull/1171 I am not sure of the wording used, and I'd love some feedback. Thanks! On Mon, Apr 17, 2017 at 8:10 AM Steven D'Aprano wrote: > On Sat, Apr 15, 2017 at 12:09:39AM +1000, Nick Coghlan wrote: >

Re: [Python-ideas] Discourage operator.__dunder__ functions

2017-04-16 Thread Steven D'Aprano
On Sat, Apr 15, 2017 at 12:09:39AM +1000, Nick Coghlan wrote: > On 14 April 2017 at 04:20, Steven D'Aprano wrote: > > Long ago, when the operator module was first introduced, there was a > > much stronger correspondence between the operator.__dunder__ functions > > and dunder

Re: [Python-ideas] Discourage operator.__dunder__ functions

2017-04-14 Thread Nick Coghlan
On 14 April 2017 at 04:20, Steven D'Aprano wrote: > Long ago, when the operator module was first introduced, there was a > much stronger correspondence between the operator.__dunder__ functions > and dunder methods. But I think that correspondence is now so weak that > we

Re: [Python-ideas] Discourage operator.__dunder__ functions

2017-04-13 Thread Terry Reedy
On 4/13/2017 2:20 PM, Steven D'Aprano wrote: Notice that I said *discourage* rather than *deprecate*. Quoting the documentation: The operator module exports a set of efficient functions corresponding to the intrinsic operators of Python. For example, operator.add(x, y) is

Re: [Python-ideas] Discourage operator.__dunder__ functions

2017-04-13 Thread Guido van Rossum
+1 On Apr 13, 2017 11:26 AM, "Steven D'Aprano" wrote: > Notice that I said *discourage* rather than *deprecate*. > > Quoting the documentation: > > The operator module exports a set of efficient functions > corresponding to the intrinsic operators of Python. For >

[Python-ideas] Discourage operator.__dunder__ functions

2017-04-13 Thread Steven D'Aprano
Notice that I said *discourage* rather than *deprecate*. Quoting the documentation: The operator module exports a set of efficient functions corresponding to the intrinsic operators of Python. For example, operator.add(x, y) is equivalent to the expression x+y. The function