3 ms·
http://docs.python.org/library/struct.html#struct.unpack http://docs.python.org/library/struct.html#struct.unpack """The result is a tuple even if it contains
by marcinw 16y ago
http://docs.python.org/library/struct.html#struct.unpack http://docs.python.org/library/struct.html#struct.unpack
"""The result is a tuple even if it contains exactly one item."""
I run into this constantly using struct.unpack(), and I find the author's idiom to be ideal way to handle this. I will use this from now on.