asottile-archive / future-fstrings

A backport of fstrings to python<3.6

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

doesn't work in jupyternotebook.

potoo0 opened this issue · comments

commented

doesn't work in jupyternotebook...

do you have a reproduction?

commented
  • python : 3.5.3
  • jupyter lab: 0.35.4
  • future-fstrings: 1.2.0

run this will raise a SyntaxError in jupyter cell:

# -*- coding: future_fstrings -*-

temp = 123
f"ss {temp}"

output:

  File "<ipython-input-2-33208a0e1fc4>", line 4
    f"ss {temp}"
               ^
SyntaxError: invalid syntax

Screenshot:
image

commented

OK, thanks.

No problem! Probably could hook into jupyter somehow to pre-process the inputs, however I know very little about how that works :S

commented

Thank for your guide. I'll dig in.