Masthash

#attrs

Hynek Schlawack
2 months ago

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!

Hynek Schlawack
2 months ago

3 BILLION ๐Ÿคฏ๐Ÿพ #python #pypi #attrs

https://pepy.tech/project/attrs

Screenshot of https://pepy.tech/project/attrs showing 3 billion total downloads for the attrs PyPI package.
Tin Tvrtkoviฤ‡
4 months ago

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

Hynek Schlawack
5 months ago

#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. ๐Ÿ˜…

Olivia Appleton
7 months ago

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.

#Bi, #transfem, and happily dating my enby sweetheart

Olivia Appleton
7 months ago

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.

#Bi, #transfem, and happily dating my enby sweetheart

`__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

@hynek @hynek
#python #attrs