tabo / numconv
Python library to convert strings to numbers and numbers to strings. Docs: http://docs.tabo.pe/numconv/tip/
| commit 35: | aedd8bfa240b |
| parent 34: | 434a77c07a95 |
| branch: | default |
cleaning
Changed (Δ3 bytes):
raw changeset »
numconv.py (3 lines added, 3 lines removed)
| … | … | @@ -124,7 +124,7 @@ class NumConv(object): |
124 |
124 |
|
125 |
125 |
Very large number to :data:`~numconv.BASE85`:: |
126 |
126 |
|
127 |
>> NumConv(85).int2str(2693233728041137 |
|
127 |
>> NumConv(85).int2str(2693233728041137) |
|
128 |
128 |
'~123AFz@' |
129 |
129 |
|
130 |
130 |
""" |
| … | … | @@ -161,7 +161,7 @@ class NumConv(object): |
161 |
161 |
Hexadecimal 'DEADBEEF' to integer:: |
162 |
162 |
|
163 |
163 |
>> NumConv(16).str2int('DEADBEEF') |
164 |
3735928559 |
|
164 |
3735928559 |
|
165 |
165 |
|
166 |
166 |
Binary '100101101010100' to integer:: |
167 |
167 |
|
| … | … | @@ -176,7 +176,7 @@ class NumConv(object): |
176 |
176 |
:data:`~numconv.BASE85` '~123AFz@' to integer:: |
177 |
177 |
|
178 |
178 |
>> NumConv(85).str2int('~123AFz@') |
179 |
2693233728041137 |
|
179 |
2693233728041137 |
|
180 |
180 |
|
181 |
181 |
""" |
182 |
182 |
radix, alphabet = self.radix, self.alphabet |
