Log in

View Full Version : Breaking a long line of code into many lines without creating intermediate vars?


SilSinn9801
3rd May 2019, 01:30
On C/C++ programming, a single long line of code (ending in the obligatory ';' semicolon) can be split into many short lines separated by newlines and whitespace (as long as the ; is only used at the end of the final split line) and still be treated as a single line of code by the parser.

Is there something similar on Python, the basis for VapourSynth?

Because I have an extremely-long line of code where I need to concatenate 88 video clips like this:
danmakuseq = danmaku00+danmaku01+danmaku02+danmaku03+danmaku04+danmaku05+(...)+danmaku83+danmaku84+danmaku85+danmaku86+danmaku87
and don't want to create too many intermediate clips or even turn on word-wrapping on my text editor.

jackoneill
4th May 2019, 15:14
Method 3: construct that with a for loop and eval(). :devil: