Skip to content

Installs in Python 2, but fails with syntax error #2

@AndreasEisele

Description

@AndreasEisele

Uses Python 3 syntax, invalid in Python 2:

$ pip install panlex_API
...
Successfully installed certifi-2018.11.29 chardet-3.0.4 idna-2.8 panlex-API-1.2.0 ratelimit-2.2.1 requests-2.21.0 urllib3-1.24.1
$ python
Python 2.7.5 (default, Jul 13 2018, 13:06:57)
>>> import panlex
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".../python2.7/site-packages/panlex.py", line 10
    def set_version(version:int):
                           ^
SyntaxError: invalid syntax
>>>

I could get rid of the problem by manually removing argument annotations in the source file, but I assume there should be an easier solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions