-1

I've been doing some searching but I couldn't find any consensus on the syntax allowed for imports.

I threw an syntax error for this import and was wondering if there was documentation on allowable syntax.

import some-module

# Do stuff.
1
  • could you add the full traceback to your question? Commented Apr 8, 2022 at 20:41

1 Answer 1

1

You can't use hyphen('-') symbol in any names in Python as this is regarded as substraction operator. Use underscore ('_') instead.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.