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

Make _ext_getattr handle a default, and add _ext_replacement_getattr … #75

Merged
merged 1 commit into from Jul 28, 2018

Conversation

jamadden
Copy link
Member

…as the unoptimized version. See #73

@jamadden jamadden requested a review from cutz July 28, 2018 18:03
Copy link

@cutz cutz left a comment

Choose a reason for hiding this comment

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

This looks good. Should we add a _ext_replacement_setattr for parity?

@jamadden
Copy link
Member Author

This package doesn't actually ever pass that argument, so even if subclasses were already overriding that method, there shouldn't be any compatibility issues.

@jamadden
Copy link
Member Author

Should we add a _ext_replacement_setattr for parity?

My instinct tells me that while one-off uses (outside of a loop, where the optimization of caching the return value of _ext_replacement doesn't matter) of _ext_getattr (once getattr is replaced) may be relatively common in subclasses, one-off uses of _ext_setattr shouldn't be...setting multiple fields should happen through the interface definition and thus already be handled by these superclasses (or be a standard field, which again is already handled).

@jamadden jamadden merged commit 7961efd into master Jul 28, 2018
@jamadden jamadden deleted the issue73-2 branch July 28, 2018 18:15
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.

None yet

2 participants