[PySide] pickling enums (again)

Robin Dunn rdunn at enthought.com
Fri May 10 20:34:53 CEST 2013


Christian Tismer wrote:
> On 07.05.13 01:48, John Ehresman wrote:
>>> On 05/06/2013 03:38 PM, Robin Dunn wrote:
>>>> I'm not sure if PyQt is doing anything different, but I've been using
>>>> SIP lately (for the new wxPython) and things like pickle or copy
>>>> module operations work fine with enum values.  IIRC SIP implements
>>>> each enum as a class that derives from int and the enum values are
>>>> instances of that class.
>> This is probably the way to go, though it's probably worth looking at
>> what comes out of the current python-dev discussion of adding enums to
>> the standard library.
>
> Just a note: Pep 435 is accepted since today!

Interesting.  I haven't been following this one, do you know if it is to 
be implemented as a Python module or will it be a new PyTypeObject  and 
corresponding C APIs?


> Now it is interesting to see how PyQT will react on this.
> A dialog with the developers could make sense ;-)

Yep, and I can keep an eye on SIP to see if it adds any support for 
python enums.

-- 
Robin Dunn
Software Engineer
Enthought, Inc.
rdunn at enthought.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20130510/10159807/attachment.html>


More information about the PySide mailing list