Skip to main content

A module to represent kharosthi numbers

Project description

Kharosthi numbers

A naive representation of Kharosthi numerals, and a way to do simple arithmetic on them (actually, we're cheating and doing arithmetic on int versions of the numbers).

Currently only supports numbers less than 10000. The naive conversion algorithm currently can't deal with arbitrarily big numbers, so we only support "𐩇" with a maximum value of 9 in front of it.

Also, 0 and negative integers are not representable in Kharosthi, and not valid numbers.

Requirements

Python >= 3.6

Usage

from kharosthi.numbers import KharosthiNumber as K

sum = K.from_int(5) + K.from_int(50)

# 7 - 4 = 3
int(difference) = K("𐩃𐩂") - K("𐩃")

Reference: https://en.wikipedia.org/wiki/Kharosthi#Numerals

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kharosthi.numbers-0.1.2.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kharosthi.numbers-0.1.2-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file kharosthi.numbers-0.1.2.tar.gz.

File metadata

  • Download URL: kharosthi.numbers-0.1.2.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.0 Linux/4.19.104-microsoft-standard

File hashes

Hashes for kharosthi.numbers-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6696ae5d3c449ab0410b0c7c77f826c30518703d8d54a142d27ca5c283c1eb10
MD5 55fabe46c535f6f0b1d85869f1169687
BLAKE2b-256 bfa1065f127ef50a150405840d03a22d4b97d5a5a1ac75cbce1dd510d4276ed7

See more details on using hashes here.

File details

Details for the file kharosthi.numbers-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: kharosthi.numbers-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.0 Linux/4.19.104-microsoft-standard

File hashes

Hashes for kharosthi.numbers-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 76808878c0f77b9dae1dde8fd7f7b0558baf0826ce5615d0e85e94aaa502950b
MD5 3ad6f35f37277971dc493566619206b4
BLAKE2b-256 01590baa7e8d7df7e450e66be08e646a6512329cd18951dbd42c5cbc27ab378d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page