From 7f81a47fe6aa8e391b5a4f6537a3a8d5397198d2 Mon Sep 17 00:00:00 2001 From: Andrey Shur Date: Sun, 18 Apr 2021 21:48:36 +0300 Subject: [PATCH] Update README.md and some descriptions --- README.md | 8 ++++---- cunumbers/cunumbers.py | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index eb50f41..a177caa 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # cu-numbers -A program for numbers conversion between Church Slavonic script (*further CU*) and Arabic numerals. +A program for numbers conversion between Arabic and Cyrillic (*further CU*) numeral systems. ## Background -See [Introduction](./INTRODUCTION.md) to learn about Cyrillic numeral system. +See [Introduction](./INTRODUCTION.md) to learn about CU numeral system. ## Requirements @@ -23,7 +23,7 @@ See [Introduction](./INTRODUCTION.md) to learn about Cyrillic numeral system. a = cunumbers.to_cu(1) - # Convert a CU number to an Arabic + # Convert a CU number to Arabic # Requires str, returns int b = cunumbers.to_arab("а҃") @@ -53,4 +53,4 @@ See [Changelog](./CHANGELOG.md). ## License -See [LICENSE](./LICENSE). \ No newline at end of file +See [LICENSE](./LICENSE). diff --git a/cunumbers/cunumbers.py b/cunumbers/cunumbers.py index 16b5bc6..d195ea4 100644 --- a/cunumbers/cunumbers.py +++ b/cunumbers/cunumbers.py @@ -1,7 +1,7 @@ # For licensing information see LICENSE file included in the project's root directory. -# To learn about numbers in Church Slavonic script, see INTRODUCTION.md +# To learn about Cyrillic numeral system (further CU), see INTRODUCTION.md """ -Module for number conversion between Church Slavonic script and Arabic. +Module for number conversion between Arabic and Cyrillic numeral systems. """ import re @@ -104,7 +104,7 @@ def _to_cu_number(input, *, flags): def _digits_to_arab(input, group = 0): - """Process CU digits.""" + """Process CU numerals.""" # DELIM MODE: @group is current hundred group # Swap digits in numbers 11-19 @@ -161,13 +161,13 @@ def _prepare(input): elif re.fullmatch("%s+" % _cu_delim_regex, input): return _to_arab_number(input, flags = CU_DELIM) else: - raise ValueError("String does not match any pattern for Church Slavonic script number") + raise ValueError("String does not match any pattern for Cyrillic numeral system number") def to_cu(input, flags = 0): """ - Convert an Arabic number into Church Slavonic script. + Convert a number into Cyrillic numeral system. Requires a non-zero integer. """ @@ -182,7 +182,7 @@ def to_cu(input, flags = 0): def to_arab(input, flags = 0): """ - Convert a Church Slavonic script number into Arabic. + Convert a number into Arabic numeral system . Requires a non-empty string. """