Skip to content

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Apr 12, 2018

__slots__ is magic and there's no need for subclasses to have
compatible definitions.

`__slots__` is magic and there's no need for subclasses to have
compatible definitions.
@@ -4296,3 +4299,13 @@ class C: pass

@undefined # E: Name 'undefined' is not defined
class D: pass

[case testSlotsCompatibility]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we test that there is still an error if we set __slots__ to something nonsensical like an int?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a test case.

Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@JukkaL JukkaL merged commit 457bc96 into master Apr 13, 2018
@gvanrossum gvanrossum deleted the slots branch April 26, 2018 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants