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

Possibilty to match same object #51

Open
sunbit opened this issue Aug 31, 2020 · 0 comments
Open

Possibilty to match same object #51

sunbit opened this issue Aug 31, 2020 · 0 comments

Comments

@sunbit
Copy link

sunbit commented Aug 31, 2020

Matching an instance of a class against it's class works perfectly but i just realied that you cannot match with the class itself:

class Marker: pass
match({"my_marker": Marker}, {"my_marker": Marker}, lambda x: print('MATCH'))

I think this should be a valid match right? Looking at the code at

https://github.com/santinic/pampy/blob/master/pampy/pampy.py#L59

seems like here we should add a check based on

inspect.isclass

What do you think?

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

1 participant