A new major release of my Flask-HTTPAuth extension is out today. Role authentication, better verification and error callbacks, and more! https://t.co/ih59PSNguX
Really nice ideas in @_inesmontani's #PyConIndia keynote: Let Them Code!
It's tempting to build package APIs that do everything for the user, but this can be constraining in the long run. Instead build APIs that allow the user to take advantage of general language features.
Some highlights:
* Multiprocessing shared memory
* The walrus operator :=
* The = format specifier for f-strings
* Much faster variable access for: globals, builtins, named tuples, class variables, and C function calls
* Beefed-up math and statistics modules
#Python tip: None and NotImplemented are singletons.
PEP 8 advises that comparisons for singletons should always be done with "is" or "is not", never the equality operators.
🐼🤹♂️ pandas trick:
Are you applying multiple aggregations after a groupby? Try "named aggregation":
✅ Allows you to name the output columns
❌ Avoids a column MultiIndex
New in pandas 0.25! See example 👇
#Python#DataScience#pandas#pandastricks