PSA: Because of how Python's enum.Enum implements nominal typing and how Python imports work, it risks seemingly mundane refactorings causing var == FooEnum.Bar comparisons to start to mysteriously fail when PyQt and Qt Designer's "Promote..." feature are involved. If you don't need such strict nominal typing, using enum.IntEnum to relax the equality comparison will avoid that source of footguns.

Show older
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.