- Concatenating a series of lists has quadratic performance. Use itertools.chain() or chain.from_iterable() instead.
- With #python iterators, we think of next() as initiating execution. With coroutines, we "await" a downstream event to initiate execution.
- Adding %(filename)s and %(lineno)d to the logging format makes it easier to see where log messages came from.
- The matrix multiplication operator "@" has the same precedence as multiplication, division, floor division, and remainder.
Last active
October 7, 2017 23:20
-
-
Save ansrivas/b4bfa4a37b24f11ab4bd8e616b12ef3a to your computer and use it in GitHub Desktop.
Python tips and tricks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment