-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add .copy() to all TL objects #3158
Comments
This wouldn't be backwards incompatible |
(Split off #1169 (comment)). I'm still not sold on this idea. Also, we would need a better name, since
|
I would be in favour of appending an underscore to the TL bit when it has a name collision. |
If anything, custom methods would always be end with underscore, so that future versions do not need to be a breaking change. |
yeah that's reasonable |
This also leads the way to making TL objects immutable and hashable |
I'm looking at ways to make objects immutable, and it seems there's no "clean" way to do so? Ways to make a class immutable in Python (and linked How to make an immutable object in Python?). I wonder if it's really worth the effort attempting to forbid immutability. |
Dataclasses...
…On Tue, 4 Jan 2022, 00:28 Lonami, ***@***.***> wrote:
I'm looking at ways to make objects immutable, and it seems there's no
"clean" way to do so? Ways to make a class immutable in Python
<https://stackoverflow.com/q/4996815/> (and linked How to make an
immutable object in Python? <https://stackoverflow.com/q/4828080/>). I
wonder if it's really worth the effort attempting to forbid immutability.
—
Reply to this email directly, view it on GitHub
<#3158 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKXNQR6FVPZQ66H6J3OP6DUUI5LBANCNFSM5D37QTOA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This is unlikely to happen in the near future so I will be closing the issue. We can reopen it if there's still interest once the time is right. |
It should accept only kwargs, each one overriding that property in the newly created object.
The text was updated successfully, but these errors were encountered: