. Python 2.1 function attributes
Greg Ewing
greg at cosc.canterbury.ac.nz
Wed Feb 7 17:08:08 EST 2001
Toby Dickenson wrote:
>
> The real problem (IMO) with file.write("formatting"%(data)) is that
> the expressions that build up the data are out of line with the static
> content. Its harder for the programmer to visualize the bigger picture
> of his output,
It seems that different people may see this differently,
since I often find it easier to visualise the output
when using a format string. When the output items are
interleaved with string literals, I find the result
is often a confusing clutter of commas and quotes,
especially when there are commas in the string
literals as well.
Besides, with the %(name) formatting item,
you can get the best of both worlds.
--
Greg Ewing, Computer Science Dept, University of Canterbury,
Christchurch, New Zealand
To get my email address, please visit my web page:
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list