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
20082026
-
…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 -…
comment by racrui · 2023-07-19 · in Ask HN: How can I get better at writing production-level Python? -
Anything requiring e.g. setattr, getattr, delattr? Without looking far, https://github.com/python-attrs/attrs/blob/main/src/attr/_ma...
comment by HelloNurse · 2023-02-14 · in Data Classification: Does Python still have a need for class without dataclass? -
…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 -
…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) -
…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 -
Or https://github.com/python-attrs/attrs
comment by BerislavLopac · 2017-11-05 · in Show HN: PySchemes – A library for validating data structures in Python -
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,…
comment by geofft · 2017-10-20 · in Object oriented programming with ANSI-C (1993) [pdf] -
…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/
comment by fermigier · 2017-09-24 · in Object Oriented Programming in Python: Encapsulation and Inheritance -
…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