mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Rename to_decimal/from_decimal to decode/encode, refs #1734
This commit is contained in:
parent
687907aa2b
commit
a29c127789
1 changed files with 2 additions and 2 deletions
|
|
@ -19,10 +19,10 @@ class BaseConverter(object):
|
|||
def __init__(self, digits):
|
||||
self.digits = digits
|
||||
|
||||
def from_decimal(self, i):
|
||||
def encode(self, i):
|
||||
return self.convert(i, self.decimal_digits, self.digits)
|
||||
|
||||
def to_decimal(self, s):
|
||||
def decode(self, s):
|
||||
return int(self.convert(s, self.digits, self.decimal_digits))
|
||||
|
||||
def convert(number, fromdigits, todigits):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue