On Thu, 2 May 2013 15:48:14 -0400 Benjamin Peterson <benja...@python.org> wrote: > 2013/5/2 Ethan Furman <et...@stoneleaf.us>: > > In order for the Enum convenience function to be pickleable, we have this > > line of code in the metaclass: > > > > enum_class.__module__ = sys._getframe(1).f_globals['__name__'] > > > > This works fine for Cpython, but what about the others? > > Regardless of that, perhaps we should come up with better ways to do this.
Two things that were suggested in private: 1) ask users to pass the module name to the convenience function explicitly (i.e. pass "seasonmodule.Season" instead of "Season" as the class "name"). Guido doesn't like it :-) 2) dicth the "convenience function" and replace it with a regular class-based syntax. Ethan doesn't like it :-) Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com