[PyQt] SIP Enums and docstring
phil at riverbankcomputing.com
Tue Mar 5 22:48:58 GMT 2019
On 5 Mar 2019, at 9:02 am, Denis Rouzaud <denis.rouzaud at gmail.com> wrote:
> Hi list, hi Phil,
> I am currently at a way of documenting enums and I am not sure what is the best approach.
> 1) SIP uses a custom type for enums and not the native Python one available since 3.4. Is it worth switching?
Python enums are used to wrap C++11 scoped enums. In PyQt6 they will be used for all enums.
> 2) SIP errors when you try to documents enums. That would need to be fixed in sipgen, correct? Would we document the enum only or its members too? What would be the syntax?
I don't see what the issue is with the syntax - do the same as with classes and attributes.
> 3) In SIP lib, we would need to adapt the creation of enums to handle the docstring. A new member needs to be added to _sipEnumTypeObject to save the docstring. But then how handling this in createEnum?
I'm not willing to make any changes to data structures that will require the major version of the SIP ABI to be changed at this stage. I want the change required by SIP5 to be the next and last one.
More information about the PyQt