release: 0.2.1

This commit is contained in:
Romain Dorgueil
2017-04-25 08:23:39 +02:00
parent c65e1f8c34
commit 18abb39206
3 changed files with 15 additions and 17 deletions

View File

@ -25,6 +25,7 @@ class ValueHolder:
at least all in a certain category, but it feels like a more correct method should exist, like with a getattr-something on the
value. Let's see later.
"""
def __init__(self, value, *, type=None):
self.value = value
self.type = type
@ -117,10 +118,10 @@ class ValueHolder:
return divmod(other, self.value)
def __pow__(self, other):
return self.value ** other
return self.value**other
def __rpow__(self, other):
return other ** self.value
return other**self.value
def __ipow__(self, other):
self.value **= other
@ -181,4 +182,3 @@ class ValueHolder:
def __invert__(self):
return ~self.value