News for hackers. Stuff that matters.
Re:Python idiom for taking the single item from a list by tmsh on Monday September 27, 2010 @08:09PM (#1734066)
This is Sparta.

  class SpartanList(list):
       def foot(self):
          return self[0]


  assert l.foot()
  return l.foot()

There are no comments on this comment yet.