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 rhettinger
Recipients eric.smith, remi.lapeyre, rhettinger, theophile
Date 2019-01-17.23:19:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1547767172.97.0.432581584599.issue35761@roundup.psfhosted.org>
In-reply-to
Content
I'm don't see the point of this proposal.  The fields of dataclasses are already mutable, so they can be updated just like any other object (no need for a special mechanism):

a = InventoryItem(name='Widget', unit_price=37.25, quantity_on_hand=10)

a.quantity_on_hand -= 1           # Sold one
a.unit_price *= 0.90              # Ten percent off sale

Also, it's not hard to directly take data from one instance to another:

a.name = master_catalog.name
a.unit_price = master_catalog.unit_price
History
Date User Action Args
2019-01-17 23:19:34rhettingersetrecipients: + rhettinger, eric.smith, remi.lapeyre, theophile
2019-01-17 23:19:32rhettingersetmessageid: <1547767172.97.0.432581584599.issue35761@roundup.psfhosted.org>
2019-01-17 23:19:32rhettingerlinkissue35761 messages
2019-01-17 23:19:32rhettingercreate