ericvsmith/dataclasses
View on GitHub ↗ ★ 594 Python
11 mentions on Hacker News by 10 people: 0 stories, 11 comments · first 2017-08-25 · latest 2024-09-05
20082026
-
See my comment and the linked email at https://github.com/ericvsmith/dataclasses?tab=readme-ov-file... for dataclasses and 3.6. I think it's still true.
comment by ericvsmith · 2024-09-05 · in Lesser known parts of Python standard library -
dataclasses was explicitly inspired by attrs. https://github.com/ericvsmith/dataclasses/issues/1
comment by geofft · 2021-12-24 · in Attrs – the Python library everyone needs (2016) -
I have a decorator to add support for slots: https://github.com/ericvsmith/dataclasses/blob/master/datacl... (although I'll admit I haven't tested it in a while). The reason it's not an option by default is because it would be the one case…
comment by ericvsmith · 2020-11-05 · in Python overtakes Java to become the second-most popular programming language -
…take less resources. `slots=True` doesn't exist, though there's an experimental implementation at https://github.com/ericvsmith/dataclasses/blob/master/datacl... . The main issue is that slots have to exist at class definition, and…
comment by duckerude · 2020-02-12 · in Applying Mypy to real-world projects -
…3.5+) * functools.lru_cache: https://github.com/jaraco/backports.functools_lru_cache * dataclasses: https://github.com/ericvsmith/dataclasses (3.6 only, requires ordered class __annotations__) I'm half-expecting someone to come along with…
comment by auscompgeek · 2019-05-15 · in Things to use in Python 3 -
…with @mhashemi's comments. See similar discussions, for instance, regarding dataclasses vs. attrs ( https://github.com/ericvsmith/dataclasses/issues/19 ). Sometimes, however, it's a bit annoying when something that you think should be…
comment by fermigier · 2018-10-10 · in Boltons: A set of BSD-licensed, pure-Python utilities -
…default values. Here's the actual reference implementation for dataclasses where it's discussed: https://github.com/ericvsmith/dataclasses/issues/28 Your second solution works fine (and is what I'd referenced). For your first solution, I'd…
comment by dfee · 2018-05-15 · in Guide to Data Classes in Python 3.7 -
…block. There's a big thread discussing the issue on python-dev somewhere. Also some discussion in https://github.com/ericvsmith/dataclasses/issues/2#issuecomm... Anyway, it's not a huge issue—attrs is great and there's no reason not to use…
comment by tommikaikkonen · 2018-04-18 · in Python 3.7: Introducing Data Classes -
While 3.7 is not here, back-port: https://github.com/ericvsmith/dataclasses
comment by fleetfox · 2018-04-18 · in Python 3.7: Introducing Data Classes -
…by attrs and have since been implementing a stdlib version of it, calling it "dataclass" see: https://github.com/ericvsmith/dataclasses and this comment thread is revealing: https://github.com/ericvsmith/dataclasses/issues/19
comment by Dowwie · 2017-09-19 · in What’s New in Python 3.7 -
…vars 3x: def __init__(self, foo) self.foo = foo There is an attrs package and new proposal ( https://github.com/ericvsmith/dataclasses/blob/master/pep-xx... ) to remedy that.
comment by mixmastamyk · 2017-08-25 · in Leaving Python for JavaScript