[PyQt] Request for Comments: Support for C++ Scoped Enums
srhaque at theiet.org
Fri Aug 11 17:56:18 BST 2017
On 11 August 2017 at 16:22, Phil Thompson <phil at riverbankcomputing.com>
> At the moment SIP only supports C-like unscoped enums and implements them
> as sub-classes of int. The main weaknesses of these are the lack of type
> safety and the injection of the member names into the enclosing scope.
> These problems were fixed by the introduction of scoped enums in newer
> versions of C++, see...
> Note that Qt doesn't currently use scoped enums but I expect that to
> Scoped enums are much closer to the implementation of Python enums...
> I propose to add support for scoped enums and implement them using Python
> enums - specifically as sub-classes of Enum (and *not* IntEnum in order to
> preserve the type safety). Consequently Python v3.4 or later will be
> required for wrapping libraries using scoped enums.
> Any comments welcome.
> PyQt mailing list PyQt at riverbankcomputing.com
My present focus is on Python2.7, and though I am keen to move onto 3,
that's perhaps some weeks/months off. So, if there is some basic support
for 2, that would allow me to transition in my own time.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt