Flags¶
ppb.flags contains singletons to communicate various things.
Flags should be used like None and ... (Ellipsis):
compare against using
isDo not instantiate new instances
New flags can simply be defined by:
class MyFlag(Flag):
"This is a flag to indicate a thing."
New classes of flags (eg mouse buttons) can be defined as:
class MyFlagType(Flag, abstract=True):
"A group of indicators"
class MyFlag(MyFlagType):
"This is a flag to indicate a thing."
Base classes¶
This is the base class for defining new flags.
Metaclasses¶
The metaclass that makes the type hinting of flags possible.