diff options
| author | Michele Simionato <michele.simionato@gmail.com> | 2018-07-26 06:43:01 +0200 |
|---|---|---|
| committer | Michele Simionato <michele.simionato@gmail.com> | 2018-07-26 06:43:01 +0200 |
| commit | 6bf177c915395ab6d8a81ff48da22be2261216c1 (patch) | |
| tree | 061447154c1297b75841379a9c06aedfa641babe | |
| parent | 813b61243c314832d40f4181f07d8a6368564ee3 (diff) | |
| download | python-decorator-git-6bf177c915395ab6d8a81ff48da22be2261216c1.tar.gz | |
Fix
| -rw-r--r-- | PITCHME.md | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -99,9 +99,7 @@ def add(a, b): >>> add.__code__.co_varnames ('a', 'b') ``` - ---- - ++++ Since 2017 you can also decorate coroutines ```python @decorator @@ -110,12 +108,14 @@ async def trace(coro, *args, **kwargs): await coro(*args, **kwargs) @trace -async def make_task(n): +async def do_nothing(n): for i in range(n): await asyncio.sleep(1) ``` ---- ++++ +Since 2018 you can define families of decorators with and without +parenthesis like `@dataclass` ```python import warnings |
