Hacker GitHub

← All repos

python-attrs/attrs

View on GitHub ↗ ★ 5,864 Python

Python Classes Without Boilerplate

9 mentions on Hacker News by 9 people: 0 stories, 9 comments · first 2017-09-01 · latest 2023-07-19

Mentions per year 9 mentions · busiest year 2017 (4)
20082026
  1. …written code. These have very well written Python, exposing much of the language expressiveness: - https://github.com/python-attrs/attrs - https://github.com/mahmoud/glom - https://github.com/pytoolz/toolz - https://github.com/Suor/funcy -…
  2. Anything requiring e.g. setattr, getattr, delattr? Without looking far, https://github.com/python-attrs/attrs/blob/main/src/attr/_ma...
  3. …Something like the attrs package needs to use a kludge[1] to communicate types back to a validator. https://github.com/python-attrs/attrs/blob/4f74fbaca3cc12911...
    comment by ben509 · 2020-09-06 · in C++20 has been approved
  4. …the meaning. Examples: https://github.com/marshmallow-code/marshmallow/blob/c1506cc... https://github.com/python-attrs/attrs/blob/eda9f2de6f7026039...
    comment by kissgyorgy · 2019-08-04 · in What Is Null? (2010)
  5. …Classes in a library supporting Python 2.7, 3.4-3.7? I don't think the answer is yes today. [1]: https://github.com/python-attrs/attrs
    comment by tedmiston · 2018-05-15 · in Guide to Data Classes in Python 3.7
  6. Or https://github.com/python-attrs/attrs
  7. Take a look at https://github.com/python-attrs/attrs which will let you do something like import attr @attr.s class Key(object): modifier = attr.ib() key = attr.ib() function = attr.ib() argument = attr.ib() keys = [ Key(MODKEY, XK_p,…
  8. …be simplified by using the awesome `attrs` package [1]. Or if / when PEP 557 gets adopted. [1]: https://github.com/python-attrs/attrs [2]: https://www.python.org/dev/peps/pep-0557/
  9. …access. It would break everything. I should say though, for simple POJO-style classes @attr.s ( https://github.com/python-attrs/attrs ) has replaced 90% of my namedtuple usage.
    comment by hyperbovine · 2017-09-01 · in Redesigning Python's named tuples