[issue35710] Make dataclasses.field() accept another name for __init__ field's name

2019-01-17 Thread Théophile Chevalier
Change by Théophile Chevalier : -- nosy: +theophile ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue35710] Make dataclasses.field() accept another name for __init__ field's name

2019-01-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: "target" seems too general for the OP's use case. "private=False" would be more focused. General renaming occasionally has uses but is mostly an anti-pattern. Some thought also needs to be given to downstream effects of renaming (what shows up in hel

[issue35710] Make dataclasses.field() accept another name for __init__ field's name

2019-01-10 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith nosy: +eric.smith type: -> enhancement ___ Python tracker ___ ___ Python-bugs

[issue35710] Make dataclasses.field() accept another name for __init__ field's name

2019-01-10 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : When creating a class, I sometimes wish to get this behavior: def MyClass: def __init__(self, param): self._param = param def __repr__(self): return f"MyClass(param={self._param})" Unless I'm making a mistaking, t