Avatar ·

How to restart a function if an exception is thrown?

📁 function, exception, work

Given a function with an exception inside. If the exception is not thrown, the function continues to work.

How to restart the function if an exception is thrown?

Avatar ·

Translation from enSO with latest edits from 27.06.2021 (author)

Personal recommendations from the original answer author for beginners

This is a personal recommendation from the answer author: start learning with and - tools that work with both Python 2 and 3 versions in various situations and take on others as soon as you need them.

PyPI modules not in standard library

  • very popular tool for creating an isolated environment for Python libraries. If you are not yet familiar with this tool, I strongly recommend studying it. I will compare with this tool throughout the rest of the answer.

It works like installing a group of files into a directory (for example: env/), and then the variable is modified

Log in to leave an answer

Blogs