You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
coconut v3.1.0 with python v3.9.18
coconut can not parse multi-line f-string properly. It will remove 'f' before the multi-line string and the compiled code is wrong.
e.g.
coconut code:
sql = f'''SELECT *
FROM SOME_TABLE
WHERE CODE = '{self.code}' '''
compile this code would raise warning: CoconutSyntaxWarning: f-string with no expressions (line xxx in 'xxx.coco')
and the compiled code is:
sql = '''SELECT *
FROM SOME_TABLE
WHERE CODE = '{self.code}' '''.format()
This code is totally wrong. Coconut should just copy the original code snippet in the generated python file.
The text was updated successfully, but these errors were encountered:
See Coconut's
[documentation](http://coconut.readthedocs.io/en/develop/DOCS.html) for
more information on all of the features listed below.
Language features:
* #833: New `case def` syntax for more easily defining pattern-matching
functions with many patterns.
* #811: New `f(name=)` syntax as a shorthand for `f(name=name)`,
replacing the now deprecated `f(...=name)` syntax.
* #836: New `CoconutWarning` built-in used for Coconut runtime warnings.
Compiler features:
* #837: Coconut will now warn about implicit string concatenation and
disable it completely with `--strict`.
* #718: Coconut will now warn about use of `addpattern def` without a
prior `match def`. This was a previously-supported feature to make
pattern-matching functions with many patterns easier to write, but the
new recommended way to do that is now via `case def`.
* #785: Initial [pyright](https://github.com/microsoft/pyright) support
via the `--pyright` flag.
Bugfixes:
* #839, #840: Fixed some f-string parsing issues.
* #834: Fixed `len` of empty `zip` objects.
* #830: Improved use of colored output.
* #757: Improved PEP 695 support on Python 3.12.
coconut v3.1.0 with python v3.9.18
coconut can not parse multi-line f-string properly. It will remove 'f' before the multi-line string and the compiled code is wrong.
e.g.
coconut code:
compile this code would raise warning:
CoconutSyntaxWarning: f-string with no expressions (line xxx in 'xxx.coco')
and the compiled code is:
This code is totally wrong. Coconut should just copy the original code snippet in the generated python file.
The text was updated successfully, but these errors were encountered: