[Python-Dev] Dataclasses, frozen and __post_init__
Guido van Rossum
guido at python.org
Tue Feb 20 16:47:06 EST 2018
More information about the Python-Dev mailing list
Tue Feb 20 16:47:06 EST 2018
- Previous message (by thread): [Python-Dev] Dataclasses, frozen and __post_init__
- Next message (by thread): [Python-Dev] Dataclasses, frozen and __post_init__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Feb 20, 2018 at 12:50 PM, Chris Barker <chris.barker at noaa.gov> wrote: > Is that one attribute that big a deal? I suppose that simple dataclasses > with only two or so attributes would see a significant change, but if > you're really worried about space, wouldn't you use a namedtuple or simply > a tuple anyway? > It's not just the space I worry about, it's about stomping on the user's namespace for instance variables. So far dataclasses works by adding things to the class only -- I want to place the bar pretty high before we change that. Anyway, there are several solutions now that people can implement as separate class decorators and distribute via PyPI (or copy into their own codebase) so I don't think now's the time to consider adding this to dataclasses. Maybe for Python 3.8. -- --Guido van Rossum (python.org/~guido) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20180220/c61901f4/attachment.html>
- Previous message (by thread): [Python-Dev] Dataclasses, frozen and __post_init__
- Next message (by thread): [Python-Dev] Dataclasses, frozen and __post_init__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list