t2string 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
t2string/__init__.py ADDED
@@ -0,0 +1 @@
1
+ from t2string import t2string
t2string/t2string.py ADDED
@@ -0,0 +1,12 @@
1
+ from string.templatelib import Template
2
+
3
+ def t2string(t_string: Template) -> str :
4
+ values: list[str] = []
5
+
6
+ for i in t_string:
7
+ if isinstance(i, str):
8
+ values.append(i)
9
+ else:
10
+ values.append(i.value)
11
+
12
+ return "".join(values)
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.4
2
+ Name: t2string
3
+ Version: 0.1.0
4
+ Summary: Converts new template string (t-string)(in python 3.14) to normal string
5
+ Author-email: Yuvneil <yuvneiledu44@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/yourusername/mypackage
8
+ Requires-Python: >=3.14
9
+ Description-Content-Type: text/markdown
10
+
11
+ # 🧩 t2string
12
+
13
+ Convert **Python 3.14’s `t` strings** (translatable strings) into **normal strings** — quickly and easily.
14
+
15
+ ---
16
+
17
+ ## ✨ Overview
18
+
19
+ Starting with **Python 3.14**, a new string literal prefix `t` was introduced for *translatable strings*, such as:
20
+
21
+ ```python
22
+ msg = t"Hello, world!"
@@ -0,0 +1,6 @@
1
+ t2string/__init__.py,sha256=YYyUgm2RwHxqPWuxRLZ_SCJgs1I8Al6KjU5SaDTP3eo,29
2
+ t2string/t2string.py,sha256=B5-YqC93PCayYdHc3E0clJ7PMyOU1sd2Zd5Vh31D6hQ,297
3
+ t2string-0.1.0.dist-info/METADATA,sha256=S6Y_oFvQQck79ARzIREfazB422bfL-eaAGK_9PN0W3E,646
4
+ t2string-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
5
+ t2string-0.1.0.dist-info/top_level.txt,sha256=FkwIlCUc55ccgdq0__Dx93WIGfXwIl8JsyQq9x9gQTw,9
6
+ t2string-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ t2string