Skip to content
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 __slots__ to ObserverExpression and its subclasses #1515

Merged
merged 1 commit into from
Sep 9, 2021

Conversation

mdickinson
Copy link
Member

Along with #1513, this closes #1511.

Copy link
Contributor

@rahulporuri rahulporuri left a comment

Choose a reason for hiding this comment

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

LGTM


def test_single_expression(self):
expr = create_expression(1)
self.assertFalse(hasattr(expr, "__dict__"))
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpicky question - why not use the same tests as earlier where you check for an exception instead of a different test?

Copy link
Member Author

Choose a reason for hiding this comment

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

Meh. That was this morning; this afternoon, I like this way better. (But not enough better to go back and update all the other tests.)

@mdickinson mdickinson merged commit f998542 into main Sep 9, 2021
@mdickinson mdickinson deleted the performance/add-slots-to-observer-expression branch September 9, 2021 12:11
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.

Use __slots__ for observer internals
2 participants