Рубрика «pythonetc eng»

Tips and tricks from my Telegram-channel @pythonetc, January 2020 - 1

It is a new selection of tips and tricks about Python and programming from my Telegram-channel @pythonetc.

Previous publications.

Tips and tricks from my Telegram-channel @pythonetc, January 2020 - 2

The order of except blocks matter: if exceptions can be caught by more than one block, the higher block applies. The following code doesn’t work as intended:
Читать полностью »

Tips and tricks from my Telegram-channel @pythonetc, December 2019 - 1

It is a new selection of tips and tricks about Python and programming from my Telegram-channel @pythonetc.

Previous publications.

Tips and tricks from my Telegram-channel @pythonetc, December 2019 - 2

Different asyncio tasks obviously have different stacks. You can view at all of them at any moment using asyncio.all_tasks() to get all currently running tasks and task.get_stack() to get a stack for each task.
Читать полностью »

Tips and tricks from my Telegram-channel @pythonetc, November 2019 - 1

Tips and tricks from my Telegram-channel @pythonetc, November 2019

It is a new selection of tips and tricks about Python and programming from my Telegram-channel @pythonetc.

Previous publications.

Tips and tricks from my Telegram-channel @pythonetc, November 2019 - 2

PATH is an environment variable that stores paths where executables are looked for. When you ask your shell to run ls, the shell looks for the ls executable file across all paths that are presented in PATH.
Читать полностью »

Tips and tricks from my Telegram-channel @pythonetc, October 2019 - 1

It is a new selection of tips and tricks about Python and programming from my Telegram-channel @pythonetc.

Previous publications

Tips and tricks from my Telegram-channel @pythonetc, October 2019 - 2

If you want to iterate over several iterables at once, you can use the zip function (it has nothing to do with ZIP file format):
Читать полностью »

Tips and tricks from my Telegram-channel @pythonetc, August 2019 - 1

It is a new selection of tips and tricks about Python and programming from my Telegram-channel @pythonetc.

Previous publications

Tips and tricks from my Telegram-channel @pythonetc, August 2019 - 2

If an instance of a class doesn’t have an attribute with the given name, it tries to access the class attribute with the same name.

>>> class A:
...     x = 2
...
>>> A.x
2
>>> A().x
2

Читать полностью »

Tips and tricks from my Telegram-channel @pythonetc, July 2019 - 1

It is a new selection of tips and tricks about Python and programming from my Telegram-channel @pythonetc.

Previous publications

Tips and tricks from my Telegram-channel @pythonetc, July 2019 - 2

You can’t mutate closure variables by simply assigning them. Python treats assignment as a definition inside a function body and doesn’t make closure at all.
Читать полностью »

Tips and tricks from my Telegram-channel @pythonetc, May 2019 - 1

It is a new selection of tips and tricks about Python and programming from my Telegram-channel @pythonetc.

Previous publications
Читать полностью »


https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js