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

WPI/ENH: Match __init__ signature #6

Open
wants to merge 1 commit into
base: fork
Choose a base branch
from
Open

WPI/ENH: Match __init__ signature #6

wants to merge 1 commit into from

Conversation

bashtage
Copy link

Match signature of property

Match signature of property
@bashtage
Copy link
Author

This is not complete, but I wanted to see if you support matching properties sig. This caught me out since I have a metaclass that checks for properties and then reinitializes them. The call to cached_property is different and so rather than have

if isinstance(attr, property):
    attr.__class__(attr.fset, attr.fget, attr.fdel, attr.__doc__)

I have to special case cached_property. I believe this is called the Liskov substitution principle.

@bashtage bashtage changed the title ENH: Match __init__ signature WPI/ENH: Match __init__ signature Sep 14, 2019
@althonos
Copy link
Owner

Wonderful, thank you. Is it clear to merge or do you want to change some more things?

@bashtage
Copy link
Author

bashtage commented Sep 15, 2019 via email

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.

2 participants