projects
/
py-rsbac
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
959a3ec
)
Added /= operator to flags classes (to remove flags).
author
Frédéric Jolliton
<git@frederic.jolliton.com>
Thu, 26 Oct 2006 00:12:52 +0000
(
00:12
+0000)
committer
Frédéric Jolliton
<git@frederic.jolliton.com>
Thu, 26 Oct 2006 00:12:52 +0000
(
00:12
+0000)
rsbac/_flags.py
patch
|
blob
|
history
diff --git
a/rsbac/_flags.py
b/rsbac/_flags.py
index
56d79a6
..
c49cc7c
100644
(file)
--- a/
rsbac/_flags.py
+++ b/
rsbac/_flags.py
@@
-100,6
+100,9
@@
def buildFlagsClass( className , bases , bits ) :
def __and__( self , v ) :
return t( self.value & init( v ) )
@addTo( t )
+ def __div__( self , v ) :
+ return t( self.value & ( init( v ) ^ mask ) )
+ @addTo( t )
def __invert__( self ) :
return t( self.value ^ mask )
return t