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

Matching binary strings #40

Open
naumruso opened this issue Oct 18, 2019 · 1 comment
Open

Matching binary strings #40

naumruso opened this issue Oct 18, 2019 · 1 comment

Comments

@naumruso
Copy link

I think there is a problem with matching simple python objects that have binary strings in them.

In the example below the first three cases should be matched, but they all fail.

match({b'name':'John', b'surname':b'Doe', b'age':42},
      {b'age':42}, lambda x:x,
      {b'name':'John'}, lambda x:x,
      {b'surname':b'Doe'}, lambda x:x,
      _, lambda x:'fail')

Another example, but the problem is the same, the binary string isn't matched.

match([1,b'binary_string',3],
      [1,b'binary_string',_], lambda x:x,
       _, lambda x:x)

I've tried the examples with the latest pampy 0.2.1 on python 3.6 and 3.7.

Thanks.

@santinic
Copy link
Owner

santinic commented Nov 7, 2019

You are right, this is not supported yet

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