Out-denting multiline comments

François Pinard pinard at iro.umontreal.ca
Thu Aug 8 19:35:44 CEST 2002


[Max M]

> thisLooksBadInSource = """
> Name: %(name)s
> age: %(age)s
> """ % vars()


For the above, and presuming the initial newline is not meant, I would use:


---------------------------------------------------------------------->
def something():

    thisLooksBadInSource = ("""\
Name: %(name)s
age: %(age)s
"""
                            % vars())
----------------------------------------------------------------------<


It took a bit of time, but I learned to appreciate this as NotSoBad! :-)

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard





More information about the Python-list mailing list