abulka / pynsource

Reverse engineer Python source code into UML
http://pynsource.com
283 stars 40 forks source link

can't process python3 files with f-strings and {var=} syntax #81

Closed lolo26130 closed 3 years ago

lolo26130 commented 3 years ago

can't process python3.8 files containing f-strings with {var=} syntax i.e. :

!/usr/bin/env python3

variable = 'a' print(f'{variable=}')

Screenshot_Pynsource_f-string

abulka commented 3 years ago

Thanks for reporting this.

The ability to specify an = sign after a variable in an fstring is a Python 3.8 feature. See f-strings support = for self-documenting expressions and debugging. Pynsource will have to be running under Python 3.8 to handle this syntax.

Pynsource release binaries currently run under Python 3.7.

Running the latest master of Pynsource from source under Python 3.8 will allow you to parse this 3.8 syntax. I hope to update the Pynsource release binaries to Python 3.8 in the next release.