Message210623
The only thing I hate more than being wrong is being wrong because Python isn't acting the way I think it should. :/
So, __qualname__ is not set properly when using the function API (although it has nothing to do with manually setting __module__ (I removed it, tested, no difference)).
And, if a subclass defines __reduce__, but an ancestor class defines __reduce_ex__, the ancestor class wins -- this seems to completely defeat the purpose of subclassing.
I'll add a 'qualname' parameter (mirroring the 'module' parameter) to the function API, and I'll use __reduce_ex__.
A little experimenting shows that if the base class implements any of __reduce__, __reduce_ex__, __getnewargs__, or __getnewargs_ex__ that pickling will work, so modified that portion of Enum as well. |
|
Date |
User |
Action |
Args |
2014-02-08 13:00:48 | ethan.furman | set | recipients:
+ ethan.furman, barry, pitrou, alexandre.vassalotti, eli.bendersky, python-dev, serhiy.storchaka |
2014-02-08 13:00:47 | ethan.furman | set | messageid: <1391864447.61.0.935879196518.issue20534@psf.upfronthosting.co.za> |
2014-02-08 13:00:47 | ethan.furman | link | issue20534 messages |
2014-02-08 13:00:47 | ethan.furman | create | |
|