How can an int be '+' with a tuple?

Chris Angelico rosuav at gmail.com
Sat Jun 2 23:53:23 EDT 2018


On Sun, Jun 3, 2018 at 12:55 PM, Jach Fong <jfong at ms4.hinet.net> wrote:
> The attached is a script which can run under Python 3.4/Windows Vista
> correctly. One thing make me puzzled is that the "any + context" at line
> 18. The "any" was passed as an integer from line 43 and the "context"
> was defined as a tuple at line 35. This concatenation works! how?
>

If In Doubt, Print It Out.

Try adding some print calls to see exactly what those values really
are. You may be surprised.

ChrisA



More information about the Python-list mailing list