Suppose you are calling a function, where there’s clearly a need to break down the statement into few lines, for readability’s sake. However there are at least two way to do it:
Would you do this:
return render(request, template,
{
'var1' : value1,
'var2' : value2,
'var3' : value3
}
)
Or would you rather do that:
return render \
(
request, template,
{
'var1' : value1,
'var2' : value2,
'var3' : value3
}
)
Or, please suggest your own formatting. Please also list reasons why would you use a particular formatting and what’s wrong with the other one.
Thanks
I’d probably do:
I would keep the bracket on the same line, so that searches for
render(work. And because I find it clearer. But I’d put all the arguments on new lines.