Support for emoji digits in Python
Project description
Emojit
This package aims to address a long-standing Python issue:
int("1️⃣") != 1
Usage
from emojit import emj
emoji_str = emj("4️⃣0️⃣2️⃣")
assert isinstance(emoji_str, str) is True
assert int(emoji_str) == 402
Please, don't actually use this.
Advanced usage
Underscores as visual separators
from emojit import emj
assert int(emj("4️⃣0️⃣2️⃣_0️⃣0️⃣0️⃣")) == 402_000
Shorthand emojis
from emojit import emj
assert int(emj("🔟")) == int(emj("1️⃣0️⃣"))
assert int(emj("💯")) == int(emj("1️⃣0️⃣0️⃣"))
Support
This package is considered feature complete. It will be archived once the functionality is upstreamed into the Python standard library.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
emojit-1.0.2.tar.gz
(2.0 kB
view details)
Built Distribution
File details
Details for the file emojit-1.0.2.tar.gz
.
File metadata
- Download URL: emojit-1.0.2.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/24.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b7fb259e123ec8ce652dff75470a5679d6ec244e95f65af0ab2a464aefaef22 |
|
MD5 | ebf31f74ef69043749fa6a57e6ab9190 |
|
BLAKE2b-256 | 11454b8585b79601f33b4cf2f0d02c8db73aa389f93f5c260f88e44f6857d461 |
File details
Details for the file emojit-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: emojit-1.0.2-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/24.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9821002246ce429ee2404e55b3cc441ba89e668eabd4401bd513c33666fc6fe |
|
MD5 | 0e88c6ab01a04c49805ef61837c960ba |
|
BLAKE2b-256 | 565b5612319c5992b75e50ed7b7d2ed89c5ae83c87fc5fcfdc7e9b7783b56c75 |