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

Guido van Rossum guido at python.org
Fri May 3 18:23:43 CEST 2013


On Fri, May 3, 2013 at 9:08 AM, Barry Warsaw <barry at python.org> wrote:

On May 03, 2013, at 07:40 PM, Steven D'Aprano wrote:

The problem is that this is not an expression, it is a statement. The advantage of the convenience function is not just that it is shorter, but that it is an expression. 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. BTW, I made a suggestion elsewhere that the first argument could accept, but not require dotted names in the first argument. If provided, rsplit the string and use the prefix as module. If not given, fallback to the getframe() hack for those implementations where it's available. The same could probably be done to namedtuples.

All sounds good to me.

-- --Guido van Rossum (python.org/~guido)



More information about the Python-Dev mailing list