Write your own timer decorators and context managers, time.perf_counter, timeit.Timer and caveats

preview_player
Показать описание
Learn how to write your own timers with decorators for measuring how long a function takes to run.

We'll meet using context managers to write our own timers for arbitrarily long blocks of code.

Then we'll meet the timeit builtin module and how to use it in your programs and running it from the command line as well.

A great thing to have up your sleeve for the times that you need it.
Рекомендации по теме
Комментарии
Автор

If you've found this useful in anyway, I'd really appreciate sharing it where you can so that more people can enjoy this resource! Watch out for a personal video I'm making on my own journey and how I changed career in my 30s from boring monotony to an exciting software engineering role. If ever you needed motivation or wanted my own specific advice on how to become a self-taught developer, then you make sure you don't miss it. Will be available next week!

LivePython