Rob Young | digital

Personal Reference

I find myself searching for the same bits of documentation again and again. This page is a collection of the things I find myself looking up most often.

Python

f-strings

Comprehensions

Nested comprehensions

[
  item 
  for inner in outer
  for item in inner
]

Special methods

Special method names

Bash

Escape single quotes

Since Bash 2.04 some escapes are allowed in $ strings.


> echo $'foo \'bar\' foo'
foo 'bar' foo