diff --git a/README.md b/README.md index 49e39c7..256edce 100644 --- a/README.md +++ b/README.md @@ -1068,9 +1068,10 @@ from dataclasses import make_dataclass #### Rest of type annotations (CPython interpreter ignores them all): ```python +import typing as tp, collections.abc as abc +: list/set/abc.Iterable/abc.Sequence/tp.Optional[] [= ] +: dict/tuple/tp.Union[, ...] [= ] def func(: [= ]) -> : ... -: typing.List/Set/Iterable/Sequence/Optional[] -: typing.Dict/Tuple/Union[, ...] ``` ### Slots diff --git a/index.html b/index.html index 8c54a48..3774614 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@
- +
@@ -903,9 +903,10 @@ Z = dataclasses.make_dataclass('Z', ['<class_name>', <coll_of_tuples>) <tuple> = ('<attr_name>', <type> [, <default_value>]) -

Rest of type annotations (CPython interpreter ignores them all):

def func(<arg_name>: <type> [= <obj>]) -> <type>: ...
-<var_name>: typing.List/Set/Iterable/Sequence/Optional[<type>]
-<var_name>: typing.Dict/Tuple/Union[<type>, ...]
+

Rest of type annotations (CPython interpreter ignores them all):

import typing as tp, collections.abc as abc
+<var_name>: list/set/abc.Iterable/abc.Sequence/tp.Optional[<type>] [= <obj>]
+<var_name>: dict/tuple/tp.Union[<type>, ...] [= <obj>]
+def func(<arg_name>: <type> [= <obj>]) -> <type>: ...
 

Slots

Mechanism that restricts objects to attributes listed in 'slots' and significantly reduces their memory footprint.

class MyClassWithSlots:
@@ -2935,7 +2936,7 @@ $ pyinstaller script.py --add-data '<path>:.'