README, bitmask.py: rewrite examples to new format
This commit is contained in:
parent
6ccad93aa2
commit
060d91473b
@ -32,7 +32,7 @@ class Desc(IntFlag):
|
||||
FUNKY = 1 << 2
|
||||
LARGE = 1 << 3
|
||||
|
||||
marble = Bitmask(Desc, Desc.SMALL, Desc.ROUND, Desc.FUNKY)
|
||||
marble = Bitmask(Desc.SMALL, Desc.ROUND, Desc.FUNKY)
|
||||
|
||||
Desc.SMALL in marble
|
||||
>>> True
|
||||
@ -40,6 +40,6 @@ Desc.SMALL in marble
|
||||
Desc.LARGE in marble
|
||||
>>> False
|
||||
|
||||
Bitmask(Desc, Desc.SMALL, Desc.ROUND) in marble
|
||||
Bitmask(Desc.SMALL, Desc.ROUND) in marble
|
||||
>>> True
|
||||
```
|
||||
|
@ -24,7 +24,7 @@ class Bitmask:
|
||||
ROUND = 1 << 1
|
||||
FUNKY = 1 << 2
|
||||
|
||||
bmask = Bitmask(Desc, Desc.BIG, Desc.FUNKY)
|
||||
bmask = Bitmask(Desc.BIG, Desc.FUNKY)
|
||||
|
||||
Determine if a flag enabled::
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user