[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Why adding an extra parentheses can let function return only one return value?
- From: Nan Xiao <xiaonan830818@...>
- Date: Thu, 16 Jul 2015 10:37:16 +0800
After reading pil
, I know adding an extra parentheses can let function return only one return value:
return 1, 2
print(f()) --> 1, 2
print((f())) --> 1
But the pil doesn't tell the reason behind it.
Could anyone explain it? Thanks very much in advance!