mirror of
https://github.com/bblaz/num2words.git
synced 2025-12-06 06:42:25 +00:00
Use in operator instead of has_key for python3 support
This commit is contained in:
@@ -47,7 +47,7 @@ class Num2Word_IT(object):
|
||||
if len(str_num) > 6:
|
||||
current_power = 6
|
||||
# check for highest power
|
||||
if self._exponent.has_key(power):
|
||||
if power in self._exponent:
|
||||
# convert the number above the first 6 digits
|
||||
# with it's corresponding $power.
|
||||
snum = str_num[0:-6]
|
||||
@@ -171,7 +171,7 @@ class Num2Word_IT(object):
|
||||
ret = ret + self._sep + self._digits[d]
|
||||
|
||||
if power > 0:
|
||||
if self._exponent.has_key(power):
|
||||
if power in self._exponent:
|
||||
lev = self._exponent[power]
|
||||
|
||||
if lev is None:
|
||||
|
||||
Reference in New Issue
Block a user