GAK allows for easy and customizable conversion of numbers to different bases. Here’s a crash course in usage:
from gak import base # prints "F" print(base(15, 16))
base() takes two arguments: the number being converted, and what base to convert the number to. An optional third argument is a custom lookup table for the base conversion that looks as follows:
#prints "bab"
print(base(5, 2, {0: "a", 1: "b"}))
It is a dictionary where the key is the number to be converted and the value is what string the number should become. By default GAK provides a lookup table up to base16.
Release files for gak 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gak-1.0.tar.gz | 1.3 kB | Details |
Release files / gak-1.0.tar.gz
| Download URL | gak-1.0.tar.gz |
|---|---|
| Size | 1.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c47a062fda416577b5751ea62ddd95283a5917ffc2c30ad2ae1dbbed1328004f
|
|
BLAKE2b-256 checksum How to use checksums |
cae47e1f64661e17a21b441a62bc475b3bbc9877479913ea8c7eb6664ea754cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.1
|