How can I do a line break (line continuation) in Python (split up a long line of source code)?

What is the line? You can just have arguments on the next line without any problems: a = dostuff(blahblah1, blahblah2, blahblah3, blahblah4, blahblah5, blahblah6, blahblah7) Otherwise you can do something like this: if (a == True and b == False): or with explicit line break: if a == True and \ b == False: Check … Read more

How to prevent YAML to dump long line without new line

Thanks @MathieuMarques for suggesting to look @ dump options and link provided, YAML documentation was not good enough to find it out. Anyways solution is to specify width parameter for dump function. i.e. yaml.dump(data, width=1000) A better approach suggested by @RandomCoder to use yaml.dump(data, width=float(“inf”)) for a permanent solution.

tech