[Tutor] implied tuple in a list comprehension

Jim Mooney cybervigilante at gmail.com
Fri Aug 2 21:18:10 CEST 2013


On 2 August 2013 12:07, Alan Gauld <alan.gauld at btinternet.com> wrote:

> t = (6,)  # t=6,  works but is much harder to see.

That could lead to awful bugs, since it really is hard to see, and
hitting the comma is a mistake I often make. I think I may stick with
always using parentheses for tuples. Some conveniences aren't that
convenient.

Jim


More information about the Tutor mailing list