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

Can't import: Hyphen in name? #2

Open
KatherineKing opened this issue Apr 4, 2023 · 1 comment
Open

Can't import: Hyphen in name? #2

KatherineKing opened this issue Apr 4, 2023 · 1 comment

Comments

@KatherineKing
Copy link

Hi,
Looking forward to using the package.
I can't run the example code. I get a syntax error, at the hyphen:
from fightin-words import fightin-words as fw
^
SyntaxError: invalid syntax

Is this resolvable?
Thanks!

@kenlimmj
Copy link
Owner

kenlimmj commented Apr 4, 2023

The module probably should be renamed to an underscore... I can try to do that but it's been a good long while since I've come back to this piece of code. No promises on when.

While I get to doing that you can probably still achieve the import with importlib by doing something like:

import importlib  
fightinWords = importlib.import_module("fightin-words")

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