[Python-Dev] PyPy, Jython, & IronPython: Enum convenience function and pickleablity

Terry Jan Reedy tjreedy at udel.edu
Fri May 3 21:51:02 CEST 2013


On 5/3/2013 12:08 PM, Barry Warsaw wrote:

> Exactly right, but let's stop calling it the "convenience API" and instead
> call it the "functional API".  I probably started the perpetuation of this
> problem; let's update the PEP.

Please do. To me, a 'convenience function' is something like the timeit 
functions or subprocess.call that create a class instance, call a method 
(or two) on the instance, and then discard the instance while returning 
the result of calling methods. For the common case handled by the 
function, the implementation via a class with methods is a detail that 
the user hardly need know about.

Using a function interface to create and return a class is something else.

--
Terry Jan Reedy





More information about the Python-Dev mailing list