We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a1a1cc commit c4d2e4eCopy full SHA for c4d2e4e
1 file changed
dice_notation/dice.py
@@ -129,7 +129,9 @@ def roll(self):
129
130
if self.quantity == 0 or self.sides == 0:
131
result = 0
132
- elif self.quantity and self.quantity > 0 and self.sides and self.sides > 0:
+ elif self.quantity is None and self.sides is None:
133
+ result = None
134
+ elif self.quantity > 0 and self.sides > 0:
135
for x in xrange(self.quantity):
136
result += randint(1, self.sides)
137
else:
0 commit comments