# This trivial Python program fails. # # Python 2.2a1+ (#12, Aug 18 2001, 14:42:50) # [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-85)] on linux2 # # To really confuse yourself, set xml to 0 and watch it run without error. xml = 1 stem = "a" if xml: stem += "b", else: stem += "b" # Here is the error I see: # # Traceback (most recent call last): # File "foo.py", line 11, in ? # stem += "b", # TypeError: cannot add type "tuple" to string -- <a href="http://www.tuxedo.org/~esr/">Eric S. Raymond</a> The world is filled with violence. Because criminals carry guns, we decent law-abiding citizens should also have guns. Otherwise they will win and the decent people will lose. -- James Earl Jones
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4