[Baypiggies] padding variable assignments, why is it bad?
Paul McNett
p at ulmcnett.com
Sat Aug 11 06:54:29 CEST 2012
The only place I still try to line up columns is with sql statements, like:
{{{
con = sqlite.connect(":memory:")
cur = con.cursor()
sql = """
select customers.name as cust_name,
invoices.number as inv_num
from customers
inner join invoices
on invoices.cust_id = customers.id
where customers.id = ?
"""
cur.execute(sql, (cust_id,))
rs = cur.fetchall()
}}}
I used to be afflicted with the desire to line up almost everything horizontally, but
over time I naturally stopped doing that, but it really is all about readability so
do what is most readable to you, just be prepared for your definition of 'readable'
to change over time.
Paul
More information about the Baypiggies
mailing list