[Python-Dev] Best practices for Enum
Stefan Krah
stefan at bytereef.org
Mon May 13 12:14:04 CEST 2013
Raymond Hettinger <raymond.hettinger at gmail.com> wrote:
> I would like to ask for a little restraint and for there to
> be individual cost/benefit evaluations for each case.
+1
> For external constants, some thought needs to be given to:
> * is the current API working just fine (i.e. decimal's ROUND_DOWN)
For compatibility with the Python version, I recently changed the rounding
constants of the C version to strings. This was at the request of a user
who wanted to exchange (Decimal, ROUNDING) pickles between the versions.
I think the strings are working fine and personally I have no plans to
change the type again.
The episode shows that pickling backwards compatibility is one thing
to consider, but I'm probably stating the obvious here. :)
Stefan Krah
More information about the Python-Dev
mailing list