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

Python 3.5 support for f-strings? #489

Closed
CarloNicolini opened this issue Oct 24, 2018 · 1 comment
Closed

Python 3.5 support for f-strings? #489

CarloNicolini opened this issue Oct 24, 2018 · 1 comment

Comments

@CarloNicolini
Copy link

  • nxviz version:
    Development version
  • Python version:
    3.5
  • Operating System:
    Ubuntu 16.04

Description

Is there any idea to make the f-string syntax of nxviz backcompatible with Python 3.5?
Unfortunately I cannot import it as I get the following error:

>>> import nxviz
File "/home/user/workspace/nxviz/nxviz/plots.py", line 1112
    .encode(alt.X(f'{self.node_lon}:Q',
                                 ^
SyntaxError: invalid syntax
@ericmjl
Copy link
Owner

ericmjl commented Oct 24, 2018

@CarloNicolini: thanks for pinging in! Unfortunately, f-strings are a Python 3.6-only feature. I'm unaware of any way to back-port it to 3.5.

As a matter of design, I try to use the latest features of the Python programming language in nxviz, which means only supporting the last two versions of Python. (This is also a common practice with other packages.)

@ericmjl ericmjl closed this as completed Oct 24, 2018
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