Why is Player a frozen dataclass and Team not? #252
Unanswered
DriesDeprest
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For one of my projects, I'm interested in overwriting the team_id and player_id attributes of the Team and Player objects respectively in my TrackingDataset object. I want to replace the provider ID's with ID values from another provider.
I noticed that it can be done for the Team object but not for the Player object, as the Player class is a dataclass with the frozen parameter set to True (see: https://github.com/PySport/kloppy/blob/master/kloppy/domain/models/common.py#L116).
@koenvo why do we have set the frozen parameter set to True for the Player class? And why is it different from the Team class?
Beta Was this translation helpful? Give feedback.
All reactions