[issue45446] Add a way to hide fields in dataclasses

2021-10-13 Thread Eric V. Smith
Eric V. Smith added the comment: "hide" is not a good name for this. Does attrs have anything equivalent? This seems like a pretty niche usage, so I'm not inclined to include it without evidence of a wide-spread need for it. -- assignee: -> eric.smith __

[issue45446] Add a way to hide fields in dataclasses

2021-10-12 Thread Nium
Nium added the comment: The objective of this feature is to add a way to omit fields of a dataclass when `asdict` or `astuple` is used. The main propuse is to add the `hide` parameter in `field` and add it as an attribute in the `Field` class. ```py @dataclass class User: name: str w

[issue45446] Add a way to hide fields in dataclasses

2021-10-12 Thread Eric V. Smith
New submission from Eric V. Smith : Please explain what "hiding" does. -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-l

[issue45446] Add a way to hide fields in dataclasses

2021-10-12 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +27195 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28904 ___ Python tracker _

[issue45446] Add a way to hide fields in dataclasses

2021-10-12 Thread Nium
Change by Nium : -- nosy: formigacomcaimbra priority: normal severity: normal status: open title: Add a way to hide fields in dataclasses type: enhancement versions: Python 3.11 ___ Python tracker ___