News for hackers. Stuff that matters.
Re:Python idiom for taking the single item from a list by msbarnett on Monday September 27, 2010 @05:33PM (#1733531)
Funny, I was just thinking how much cleaner a supposedly-horrid monkey-patch would make his example in Ruby.

  thing = some_dict[my_object.get_foobar_handler()].get_only_element()
self-documents the purpose of the operation and its assumption much more legibly than the typo-esque

  (thing,) =  ...
in my opinion.
Re:Python idiom for taking the single item from a list by guns on Monday September 27, 2010 @07:34PM (#1733957)
Well, that's another way to do it.

;)