Message382891
There is type() to get the runtime type.
https://docs.python.org/3/library/functions.html#type
```python
>>> foo = 1
>>> type(foo)
<class 'int'>
```
Keep in mind that in Python using type hints does not enforce anything at runtime. You can say `foo: int = 1` but `int` there is just some extra information for type checkers, like mypy, to use.
If you want the type hints, you can use typing.get_type_hints() but this is only available for modules, classes or functions, not variables. |
|
Date |
User |
Action |
Args |
2020-12-11 21:48:17 | FFY00 | set | recipients:
+ FFY00, wlf100220 |
2020-12-11 21:48:17 | FFY00 | set | messageid: <1607723297.4.0.40140264274.issue42610@roundup.psfhosted.org> |
2020-12-11 21:48:17 | FFY00 | link | issue42610 messages |
2020-12-11 21:48:17 | FFY00 | create | |
|