#attrs
Just in time for #PyConUS, here have an attrs 23.1.0: https://github.com/python-attrs/attrs/releases/tag/23.1.0 #python
If you're an #attrs user and are coming to SLC, come and say hi!
In #Mypy 1.0, you can use `Final` attributes in #attrs classes and Mypy will know they are frozen instance attributes.
So if you use Mypy, this'll get you *overhead-free* frozen classes, but with a bunch of caveats:
* it doesn't work if the attribute has a default (any default), even like `attrs.field` or `attrs.Factory`
* the class won't be hashable by default
These are tricky to solve. The work continues. #python
#NumPy -using #Python friends!
Is joblib something y'all use and would be interesting in custom hashing support in #attrs like this gentleperson: https://stackoverflow.com/q/74975393/476759 ?
I've never heard of that pkg before but 23M dl/month suggest it's popular. ๐
It's time for a re-#introduction!
I'm a #MastersStudent in #ComputerScience. In my spare time, I develop #OpenSourceSoftware such as
- a library to talk to #ManifoldMarkets from native #Python
- a #PredictionMarket manager using the above
- a transpiler from a subset of Python to #OpenStreetMaps's OverpassQL
- bug fixes to many other projects, including #mypy, #base58, #attrs, #cpython, and more
I'm also a hobbyist editor on OpenStreetMap.
It's time for a re-#introduction!
I'm a #MastersStudent in #ComputerScience. In my spare time, I develop #OpenSourceSoftware such as
- a library to talk to #ManifoldMarkets from native #Python
- a #PredictionMarket manager using the above
- a transpiler from a subset of Python to #OpenStreetMaps's OverpassQL
- bug fixes to many other projects, including #mypy, #base58, #attrs, #cpython, and more
I'm also a hobbyist editor on OpenStreetMap.
`__attrs_pre_init__` and `__attrs_init__` support is comming to Python Attrs library!
See docs for `attr.s` `init` parameter here https://www.attrs.org/en/latest/api.html