Skip to content

Commit e4739b1

Browse files
committed
Add typing rules at RS suggested by Bruno
1 parent a22c5dc commit e4739b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1332,7 +1332,9 @@ https://virtualenvwrapper.readthedocs.io/en/latest/command_ref.html
13321332

13331333
Python by default is a dynamically typed language but there are also some statically typed languages, for instance, C and Java. However, [PEP 484](https://peps.python.org/pep-0484/) introduced typed hints, which make it possible to also do static type checking of Python code. Type hints by themselves don’t cause Python to enforce types. As the name says, type hints just suggest types. There are other tools, such as [Mypy](http://mypy-lang.org/), that will be discussed later in this section.
13341334

1335-
Here you will see a few examples of python code, this is how it will normally looks, no typing at all:
1335+
Here at Rootstrap, we suggest you use typing for functions (params and outputs). It is not necessary to use it in variable annotations (as described in [PEP 526](https://peps.python.org/pep-0526/)). We prefer to use typing as a guide for data type flow in our apps.
1336+
1337+
Now you will see a few examples of python code, this is how it will normally looks, no typing at all:
13361338

13371339
```python
13381340
import math

0 commit comments

Comments
 (0)