mirror of
https://github.com/bblaz/num2words.git
synced 2025-12-06 14:52:25 +00:00
Replace a custom implementation of an ordered dict in the file orderedmapping.py by collections.OrderedDict (#131)
This commit is contained in:
committed by
GitHub
parent
f9d8868794
commit
c326d59b2d
@@ -17,14 +17,14 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import math
|
||||
from collections import OrderedDict
|
||||
|
||||
from .compat import to_s
|
||||
from .orderedmapping import OrderedMapping
|
||||
|
||||
|
||||
class Num2Word_Base(object):
|
||||
def __init__(self):
|
||||
self.cards = OrderedMapping()
|
||||
self.cards = OrderedDict()
|
||||
self.is_title = False
|
||||
self.precision = 2
|
||||
self.exclude_title = []
|
||||
@@ -39,7 +39,7 @@ class Num2Word_Base(object):
|
||||
self.setup()
|
||||
self.set_numwords()
|
||||
|
||||
self.MAXVAL = 1000 * self.cards.order[0]
|
||||
self.MAXVAL = 1000 * list(self.cards.keys())[0]
|
||||
|
||||
def set_numwords(self):
|
||||
self.set_high_numwords(self.high_numwords)
|
||||
|
||||
Reference in New Issue
Block a user