Commit 007ec441 authored by Renato Alves's avatar Renato Alves 🌱

Apply suggestion to _episodes/01-syntax.md

parent 8448e251
......@@ -1623,18 +1623,21 @@ further expanding the number of possibilities and improving expressivity and per
Furthermore, and as you'll see in the next chapter, once you go beyond the standard library
the Python ecosystem is brimming with useful libraries for all kinds of purposes.
#### Additional syntax
- `_`, `__` - single, double underscore - usually as prefix to variable names, used to represent private or internal variables
- [`if __name__ == "__main__":`][if-name-main] - present at the bottom of modules - specifies code that should run when the script executed but not when it's `import`ed.
- [`classes`][classes] - an extremely powerful construct - you have probably already used them without knowing.
#### New features in recent versions of Python
- [`yield from`][generator-delegate] - syntax to delegate to sub-generators
- [`typing` module][typing-module] - type annotations / hints - see also [mypy][mypy]
- [`:=`][walrus] - *walrus* operator
- [`async`/`await`/`asyncio`][asyncio-module] - a collection of components to handle asynchronous I/O
- `*` and `/` - in function argument definitions - allowing [exclusively positional and keyword arguments](https://docs.python.org/3.8/tutorial/controlflow.html#special-parameters).
> ## Additional syntax & latest features
>
> There are some more elements of Python syntax that we haven't covered here, which we briefly describe below. Follow the links for recommended resources to learn more about each one.
>
> - `_`, `__` - single, double underscore - usually as prefix to variable names, used to represent private or internal variables
> - [`if __name__ == "__main__":`][if-name-main] - present at the bottom of modules - specifies code that should run when the script executed but not when it's `import`ed.
> - [`classes`][classes] - an extremely powerful construct - you have probably already used them without knowing.
>
> The features below were added in the most recent major release of Python (at time of writing), version 3.8:
>
> - [`yield from`][generator-delegate] - syntax to delegate to sub-generators
> - [`typing` module][typing-module] - type annotations / hints - see also [mypy][mypy]
> - [`:=`][walrus] - *walrus* operator
> - [`async`/`await`/`asyncio`][asyncio-module] - a collection of components to handle asynchronous I/O
> - `*` and `/` - in function argument definitions - allowing [exclusively positional and keyword arguments](https://docs.python.org/3.8/tutorial/controlflow.html#special-parameters).
{: .checklist }
{% include links.md %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment