diff --git a/Cargo.toml b/Cargo.toml index e07b90a..807c78b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "base2048" description = "Binary encoding with Base2048 in Rust." -version = "0.1.2" +version = "0.1.3" edition = "2021" exclude = ["/dist"] diff --git a/README.md b/README.md index 1abcb2a..d181ccf 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ len(b2048_data) unpacked = zlib.decompress(base2048.decode(b2048_data)).decode() len(unpacked) # => 4000 -unpacked[2000:2002]) +unpacked[2000:2002] # => '🦀🐍' ``` @@ -82,11 +82,11 @@ DecodeError: Unexpected character 8: ['ǥ'] after termination sequence 7: ['༎' ``` - To catch the error, use either `base2048.DecodeError` or its base exception, `ValueError`. ```python -from base2048 import DecodeError +import base2048 try: base2048.decode('🤔') -except DecodeError as e: +except base2048.DecodeError as e: print(e) ``` diff --git a/pyproject.toml b/pyproject.toml index 02237e1..fd827a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "base2048" description = "Binary encoding with Base2048 in Rust." -version = "0.1.2" +version = "0.1.3" readme = "README.md" requires-python = ">=3.7" license = { text = "MIT" }