Daily Shaarli
March 9, 2019
Oh que ça serait cool !
Micro-optimization for random.choices(). Convert range() to repeat(). · Issue #11889 · python/cpython
Borrowing from the technique used in the timeit module, loop with repeat() instead of range() to avoid unnecessary creation and destruction of integer objects. Gives a modest speed-up (in the 5% r...
A setup.py script using distutils / setuptools is the standard way to package Python code. Often, however, we need to perform custom actions for code generation, running tests, profiling, or building documentation, etc., and we’d like to integrate these actions into setup.py. In other words, we’d like...