Lawrence D'Oliveiro wrote:
> In message <[EMAIL PROTECTED]>, Stefan Behnel wrote:
>
>> He means he has to use backslashes instead of parentheses here.
>>
>> Which is not true, you could easily rephrase this as:
>>
>> for link in GetEachRecord(
>> "links",
>> ....):
>> out.write(
>> ....
>> )
>>
>> See? No backslash!
>
> But then you can no longer use indentation to display the two-dimensional
> structure of the statement.
Not sure what you mean here, but most people wouldn't write such code anyway.
You could easily split it up as
def format_record(record):
return "<P..." % (
record[...],
record[...])
link_records = GetEachRecord(
...
)
for record in link_records:
out.write(format_record(record))
Which reads much better IMHO.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list