This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author remi.lapeyre
Recipients eric.smith, remi.lapeyre, xtreak, Кирилл Чуркин
Date 2019-02-22.19:32:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1550863973.57.0.932749853833.issue36077@roundup.psfhosted.org>
In-reply-to
Content
I see your point.

On the other hand, a new parameter would also increase the complexity for the user.

Maybe it should not be seen as re-ordering but just a "zipping" them correctly:


@dataclass
class Parent:
    i: int
    j: int = 0


@dataclass
class Child(Parent):
    k: int
    l: int = 1


The "naive" to define Child's __index__ is:

    __index__(self, i: int, j: int = 0, k: int, l: int = 1):

but wouldn't this make sense (given that it is previsible and deterministic)?


    __index__(self, i: int, k: int, j: int = 0, l: int = 1):
History
Date User Action Args
2019-02-22 19:32:53remi.lapeyresetrecipients: + remi.lapeyre, eric.smith, xtreak, Кирилл Чуркин
2019-02-22 19:32:53remi.lapeyresetmessageid: <1550863973.57.0.932749853833.issue36077@roundup.psfhosted.org>
2019-02-22 19:32:53remi.lapeyrelinkissue36077 messages
2019-02-22 19:32:53remi.lapeyrecreate