> Can we clarify the .api (syntax) so that enums are separate from flags? > Today, everything is rendered (at least in Python) as an (enum|aenum).IntFlag. > > Here is a sample of how that an enum looks like in python: > class rx_mode(enum.IntFlag): # u32: > UNKNOWN = 0 > POLLING = 1 > INTERRUPT = 2 > ADAPTIVE = 3 > DEFAULT = 4 > > What is 3? Is it ADAPTIVE, or is it ( POLLING | INTERRUPT) ? I can > *assume* that if the block has a 0 value, I can downcast the class, but it > seems like a kludge.
Yes, agree. It's an artefact of C enums. We should make a new type flags. Cheers, Ole
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18099): https://lists.fd.io/g/vpp-dev/message/18099 Mute This Topic: https://lists.fd.io/mt/78367407/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-