Ville Vainio wrote: > Which one looks better: > ++++++++++++++++++++++++ > def usage(): > if 1: > print """\ > You should have done this > and that > """.stripindent() > +++++++++++++++++++++++++ > def usage(): > if 1: > print """\ > You should have done this > and that > """ > ++++++++++++++++++++++++++ > > When you are scanning code, the non-stripindent version of the 3-quoted > string jumps at your face as a "top-level" construct, even if it is only > associated with the usage() function. I think everybody has their own way of formatting multi-line strings and/or comments. There's no one-fits-all strategy. So instead of trying to find a compromise, why don't you write up a flexible helper function for the new textwrap module ? -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4