I particularly like:
- the use of enumerator in loops: for i,x in enumerate(array)
- decorators as a simple way of enhancing methods: @method
- one-line swapping of variables: a,b=b,a
Tips and tricks on using Python and associated tools for astronomical and scientific purposes. Written by an astronomer who uses Python on a daily basis to do science.