Idea from this post. This file gets generated by this script.
- Code uses list comprehensions?
- From string to object in python
- Get all callables from a file
- Parse import statements
- Any / all built-ins
- Char to number
- Dict() type constructor
- Get a loop counter with enumerate()
- Getattr for safely access attributes
- Look for multiple indices in a list
- Min / max default keyword-only argument
- Operator.itemgetter
- Prevent file overwriting
- Reverse an iterable
- Setattr for setting attributes
- Slice built-in
- Sort by len of a string
- Sort() vs sorted()
- Transposing a matrix
- Zip() got a strict keyword arg
- Alternate class constructors
- Customizing class creation with init_subclass
- Get all subclasses
- Make a class callable
- Method chaining
- When to use classes in python?
- From date string to datetime object
- How old is pybites?
- Make a datetime timezone aware
- Testing datetimes
- Timedelta total_seconds
- Unix timestamp to datetime
- Automic database transactions
- Custom django template filter for currency conversion
- Django form save commit kwarg
- Get close matches
- Get a loop counter with enumerate()
- How to capture the zen of python (and redirect standard output)?
- 5 things you might not know f-strings can do 💡 🧵
- F-string debugging technique
- F-string formatting techniques
- Zfill
- Easily iterate over pairs in a sequence
- Flatten a list of list
- Itertools.count
- Itertools.cycle
- Split a sequence into pairs
- Use itertools + random to simulate rolling dice
- Customizing class creation with init_subclass
- Method resolution order
- When to use classes in python?
- Determining a module's source
- Flit push package to pypi
- How to add a console script to your #python package:
- Install a package in editable mode
- Make an entry point to your python package
- Os vs pathlib
- Parse import statements
- Pathlib home and cwd
- Pathlib list files in directory
- Read / write files the modern way
- Split file name and extension
- How to better document your parametrized tests
- Parametrizing fixtures
- Run pytest tests in parallel
- Testing floats with pytest's approx()
- 5 things you might not know f-strings can do 💡 🧵
- Alphabet constants
- Bytes to string and vice versa
- More performant string building
- Removesuffix and removeprefix
- See if a string only contains ascii characters
- Split's maxspit optional argument
- Splitlines
- Startswith can receive a tuple
- String methods over regular expressions
- String replace first match
- Two ways to split on last delimiter
- Zfill
- Although practicality beats purity.
- Beautiful is better than ugly.
- Errors should never pass silently.
- How to capture the zen of python (and redirect standard output)?
- In the face of ambiguity, refuse the temptation to guess.
- Now is better than never.
- Readability counts.
- Sparse is better than dense.
- Special cases aren't special enough to break the rules.
- There should be one-- and preferably only one --obvious way to do it.
- Unless explicitly silenced
- Zip() got a strict keyword arg