osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Remove comma from tuples in python.


On 2014-02-21 09:48, Travis Griggs wrote:
> I?ve used the comma form with struct.unpack() frequently:
> 
> count, = struct.unpack(?!I?, self.packet)

This is *especially* one of those places I want extra parens to make
sure I see what's happening. I've been stung too many times by the
easy-to-miss nature of just a single comma.

-tkc