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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

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