Trailing comma (was: Re: structure in Python)

Cousin Stanley CousinStanley at hotmail.com
Tue Oct 21 11:23:22 EDT 2003


>>>
>>> x = [ 'fe' , 'fi' 'fo' , 'fum' , ]
>>>
>>> print "we have", len(x), "thingies"
we have 3 thingies

Alex ....
 
  I don't understand how an extra comma at the end
  of a sequence is supposed to help with problems
  like this where a sequence delimeter, the comma,
  has been ommitted in the middle of the sequence .... 

  I am, of course, grateful to the original coder
  for saving me the 42e-19 ergs of energy required 
  to press the comma key in cases where I would
  further extend the sequence at its end, but personally 
  find this style convention  U G L Y  and a possible
  source of confusion .... 

  This probably stems from the fact 
  that my elementary school grammar teacher
  would whack me severely about the head and shoulders
  if I wrote ....

     Uncle Scrooge took Huey, Duey, and Louie, 
     to the park. 

-- 
Cousin Stanley
Human Being
Phoenix, Arizona





More information about the Python-list mailing list