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

Require an argument to implement multiple mixins #483

Closed
mitar opened this issue Oct 18, 2017 · 2 comments
Closed

Require an argument to implement multiple mixins #483

mitar opened this issue Oct 18, 2017 · 2 comments

Comments

@mitar
Copy link
Contributor

mitar commented Oct 18, 2017

I have a base class an a set of mixins we are using to combine when defining new classes. The issue is that it seems currently there is no way to define that an argument should inherit from a list of base classes, and not just one:

def fun(argument: [BaseClass, CanBeSampledMixin, DescriptionMixin]) -> None:
    ...

So this would be that argument has to have all of the listed classes somewhere in its inheritance chain. In some way, it is similar to Union, maybe an Intersection? ;-)

@ethanhs
Copy link
Contributor

ethanhs commented Oct 18, 2017

I believe this is a duplicate of #213.

@mitar
Copy link
Contributor Author

mitar commented Oct 18, 2017

True! I literally named it the same. :-)

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

No branches or pull requests

2 participants