Skip to content

Commit ef35fed

Browse files
Евгений БлиновЕвгений Блинов
authored andcommitted
Fix typo in "JSON" references and update deserialization section
formatting
1 parent 540169c commit ef35fed

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
![logo](https://raw.githubusercontent.com/mutating/simtypes/develop/docs/assets/logo_2.svg)
1919

20-
Python type checking tools are usually very complex. In this case, we have thrown out almost all the places where there is a lot of complexity, and left only the most obvious and necessary things for runtime.
20+
Python type checking tools are usually very complex. In this case, we have thrown out almost all the places where there is a lot of complexity, and left only the most obvious and necessary things for runtime use.
2121

2222

2323
## Table of contents
@@ -31,9 +31,9 @@ Python type checking tools are usually very complex. In this case, we have throw
3131

3232
## Why?
3333

34-
It's been a long time since static type checking tools like [`mypy`](https://github.com/python/mypy) for `Python` have been available, and they've become very complex. The typing system has also become noticeably more complicated, providing us with more and more new types of annotations, new syntax and other tools. It seems that `Python` devs procrastinate endlessly, postponing all the really important [`CPyhton`](https://github.com/python/cpython) improvements in order to add more garbage to [`typing`](https://docs.python.org/3/library/typing.html).
34+
It's been a long time since static type checking tools like [`mypy`](https://github.com/python/mypy) for `Python` have been available, and they've become very complex. The typing system has also become noticeably more complicated, providing us with more and more new types of annotations, new syntax and other tools. It seems that `Python` devs procrastinate endlessly, postponing all the really important [`CPython`](https://github.com/python/cpython) improvements in order to add more garbage to [`typing`](https://docs.python.org/3/library/typing.html).
3535

36-
A separate difficulty arises for those who try to use type annotations in runtime. Many data types make sense only in the context of static validation, and there is no way to verify these aspects in runtime. And some checks, although theoretically possible, would be extremely expensive. For example, to verify the validity of annotation `List[int]` in relation to a list, you would need to go through all its objects linearly to make sure that none of them violates the contract from the annotation.
36+
A separate difficulty arises for those who try to use type annotations at runtime. Many data types make sense only in the context of static validation, and there is no way to verify these aspects at runtime. And some checks, although theoretically possible, would be extremely expensive. For example, to verify the validity of annotation `List[int]` in relation to a list, you would need to iterate over all its elements to make sure that none of them violates the contract from the annotation.
3737

3838
So, why do we need this package? There is only one function where you can pass a type or a type annotation + a specific value, and you will find out if one corresponds to the other. That's it! You can use this feature as a support when creating runtime type checking tools, however, we do not offer these tools here. You decide for yourself whether to wrap this function in syntactic sugar like decorators with automatic type checking.
3939

@@ -179,16 +179,16 @@ print(check(InnerNoneType('key'), InnerNoneType('key')))
179179

180180
## String deserialization
181181

182-
The library also provides primitive deserialization. Conversion of strings into several basic types in any combinations is supported:
182+
The library also provides basic deserialization. Conversion of strings into several basic types in various combinations is supported:
183183

184-
- `str`- any string can be interpreted as a `str` type.
184+
- `str` - any string can be interpreted as a `str` type.
185185
- `int` - any integers.
186186
- `float` - any floating-point numbers, including infinities and [`NaN`](https://en.wikipedia.org/wiki/NaN).
187-
- `bool`- the strings `"yes"`, `"True"`, and `"true"` are interpreted as `True`, while `"no"`, `"False"`, or `"false"` are interpreted as `False`.
187+
- `bool` - the strings `"yes"`, `"True"`, and `"true"` are interpreted as `True`, while `"no"`, `"False"`, or `"false"` are interpreted as `False`.
188188
- `date` or `datetime` - strings representing, respectively, dates or dates + time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
189-
- `list` - lists in [`json`](https://en.wikipedia.org/wiki/JSON) format are expected.
190-
- `tuple` - lists in [`json`](https://en.wikipedia.org/wiki/JSON) format are expected.
191-
- `dict` - dicts in [`json`](https://en.wikipedia.org/wiki/JSON) format are expected.
189+
- `list` - lists in [`JSON`](https://en.wikipedia.org/wiki/JSON) format are expected.
190+
- `tuple` - lists in [`JSON`](https://en.wikipedia.org/wiki/JSON) format are expected.
191+
- `dict` - dicts in [`JSON`](https://en.wikipedia.org/wiki/JSON) format are expected.
192192

193193
Examples:
194194

0 commit comments

Comments
 (0)