Python Tip of the Day - contextlib.contextmanager
Posted on Thu 21 October 2021 in Posts • Tagged with python, pythonTipOfTheDay, contextmanager, testing
Posted on Thu 21 October 2021 in Posts • Tagged with python, pythonTipOfTheDay, contextmanager, testing
Posted on Sun 11 July 2021 in Posts • Tagged with python, pythonTipOfTheDay, fstrings
Posted on Sat 02 May 2020 in Posts • Tagged with python, pythonTipOfTheDay, functools
Posted on Wed 08 August 2018 in Posts • Tagged with python, pythonTipOfTheDay, asyncio, coroutine, abstract, abc, asyncawait
Posted on Sun 05 August 2018 in Posts • Tagged with asyncio, python, pythonTipOfTheDay, asyncawait
Posted on Fri 03 August 2018 in Posts • Tagged with python, pythonTipOfTheDay
Posted on Thu 12 July 2018 in Posts • Tagged with python, pythonTipOfTheDay, fstrings
Python 3.6 introduced a new way to format strings. They're really f-ing cool. Let's see why.
Posted on Tue 17 April 2018 in Posts • Tagged with pythonTipOfTheDay, python
Posted on Wed 11 April 2018 in Posts • Tagged with pythonTipOfTheDay, python
So I was reviewing a coworkers pull request today and saw something I hadn't seen in
Python before. As it turns out you can have multiple if
clauses on a list comprehension.
For example:
>>> [v for v in range(50) if v % 2 == 0 if v > 10] # all even numbers …
Posted on Wed 14 February 2018 in Posts • Tagged with pythonTipOfTheDay, logging, python
Oftentimes you just want to try out something related to logging in the REPL, or in a hacky script. Wading through the docs on the logging module is this painful exercise in reading about handlers and formatters and other stuff you don't care about.
The simplest way to just get …