Trailing comma

Christopher Koppler klapotec at chello.at
Wed Oct 22 06:31:09 EDT 2003


Timo Virkkala <a at a.invalid> wrote in message news:<bn59s9$t95$1 at nyytiset.pp.htv.fi>...
> Georgy Pruss wrote:
> > "Timo Virkkala" <a at a.invalid> wrote in message news:bn415p$u9s$1 at nyytiset.pp.htv.fi...
> > Another "solution" is just to look at the previous line and check if it has the comma
> > or not. You'd better get a habit to THINK and not do things mechanically, as others
> > suggest.
> 
> Yeah, that's what I have done thus far. =)
> 
> I don't know.. I can't recall ever being burned by forgetting a comma.. 
> Whereas I do remember a couple of occasions where I've included a 
> trailing comma where I shouldn't have (SQL).

In SQL statements this seems to be common practice:

select firstname
      ,lastname
      ,address
  from ...

to avoid getting hurt...

--
Christopher




More information about the Python-list mailing list