[Baypiggies] padding variable assignments, why is it bad?
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
inner join invoices
on invoices.cust_id = customers.id
where customers.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.
More information about the Baypiggies