https://kotlinlang.org logo
#python-contributors
Title
# python-contributors
s

SerVB

07/23/2021, 4:49 PM
By the way, does anybody know a way to make an expression from a statement in Python? I researched this topic a bit today and it seems there is no way. So JS IR won't help much here because JS has a magic comma operator but Python doesn't. I guess we will have to take a look at JVM's IR to avoid reinventing the bicycle for this. Another tricky translation part will be to support labels for continue, break, and return. There are some labels in JVM and JS but there aren't simply any in Python. So looks like the journey is only starting mind blown
p

Piotr Krzemiński

07/23/2021, 5:06 PM
Could you show an example of this expression to statement?
s

SerVB

07/23/2021, 5:17 PM
(array item assignment is a statement in Python, not an expression)
b

bashor

08/02/2021, 6:00 PM
not everything is could be part of expression in JS, comma operator could be used only with expressions, so we have
BlockDecomposerLowering.kt
🙏 1
👀 1