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

perfection.czech api fails #6

Open
za3k opened this issue Oct 27, 2022 · 1 comment
Open

perfection.czech api fails #6

za3k opened this issue Oct 27, 2022 · 1 comment

Comments

@za3k
Copy link

za3k commented Oct 27, 2022

The API does not appear to accept a list of integers (matching import perfection)

  File "/home/zachary/golf_css_colors.py", line 114, in <module>
    for h in possible_functions():
  File "/home/zachary/golf_css_colors.py", line 109, in possible_functions
    hf=perfection.czech.make_hash(xs)
  File "/home/zachary/.local/lib/python3.10/site-packages/perfection/czech.py", line 249, in make_hash
    return CzechHashBuilder(words, *args, **kwargs).hash_function
  File "/home/zachary/.local/lib/python3.10/site-packages/perfection/czech.py", line 42, in __init__
    self.indices = list(range(len(words[0])))
TypeError: object of type 'int' has no len()```
@eddieantonio
Copy link
Owner

Yep. Clearly I hadn't settled on an API that works for any hashable object, as would probably be a reasonable API expectation! This has been an issue for... <checks notes> SIX YEARS?!?!?!

If I find time, I might revisit this repository and clean things up, but that probably won't be for another two weeks. I'll be honest, I kind of forget about this repo >.<

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