Hacker GitHub

← All repos

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

Mentions per year 11 mentions · busiest year 2018 (4)
20082026
  1. 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
  2. dataclasses was explicitly inspired by attrs. https://github.com/ericvsmith/dataclasses/issues/1
  3. 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…
  4. …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
  5. …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
  6. …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…
  7. …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
  8. …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
  9. 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
  10. …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
  11. …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