As described on http://docs.python.org/tutorial/controlflow.html :
Wrap lines so that they don’t exceed 79 characters.
Usualy i use breaklines on line 80, but sometimes i have functions that requires many arguments, as an example:
extractor.get_trigger_info(cur,con,env,family,iserver,version,login,password,prefix,proxyUser,proxyPass,proxyServer,triggerPage,triggerInfo)
So, what type of advice could be given for keep the guidelines on python coding Style ? what is the best practice for functions with many arguments ?
THanks in advance.
The definitive reference for questions like these is PEP 8. PEP 8 gives you the freedom to break pretty much anywhere you want (provided you break after a binary operator and use implied line-continuation inside parenthesis). Whenever you break a line, typically the next line starts in the column after the opening parenthesis:
My personal style is to try to arrange things so that the stuff on each line after the break is roughly the same length.
rather than:
Although PEP8 doesn’t really say you need to do it this way.
As a side note, if you have a function with that many positional arguments, you should probably reconsider your program design.