-
Notifications
You must be signed in to change notification settings - Fork 13
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
slots #21
Comments
If you are referring to It's useful for explicitly declaring instance attributes to avoid creating a For more info you can read the data model docs at https://docs.python.org/3/reference/datamodel.html#object.__slots__ From a brief look at your tag class it looks like just I opened a small PR that adds |
This ticket was closed with a great example. But I'm leaving open so we can identify and apply slots to other classes. Please do create a ticket for a given class if you want to make a |
a good pointer for slot useage exmples is the existing minidom. |
thought i'd give an update on the status of slots. seems after version 8 we destroy the tag class in favour of just using Node but this the increased the methods on Node. since then pypy3 has an inssue i think with deepcopy in a slot or something and when i push if fails for pypy only.. so slots are commented off for now on Node until that gets resolved. |
I read something about these improving performance but also heard they make your thing immutable. i then figured i could extend a slotted object? and the extended one wouldn't?. i put the placeholders in for slots on the html tag and commented them out for later testing and consideration but stil haven't read and understood enough about them tbh. So this will have to be something I come back to or take advice on.
The text was updated successfully, but these errors were encountered: