Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

that's a reference to my attrs library which is what data classes are based on. It originally used

    @attr.s
    class C:
        x = attr.ib()
as its main api (with `attr.attrs` and `attr.attrib` as serious business aliases so you didn't have to use it).

That API was always polarizing, some loved it, some hated it.

I will point out though, that it predates type hints and it was an effective way to declare classes with little "syntax noise" which made it easy to write but also easy to read, because you used the import name as part of the APIs.

Here is more context: https://www.attrs.org/en/stable/names.html

I REGRET NOTHING



For what it’s worth, I was in the “loved it” camp.

(I’m the author of dataclasses, and I owe an immeasurable debt to Hynek).


Thank you for creating dataclasses!


if it's good enough for glyph, it's good enough for me




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: