1 SUSPECT #1
ba = bytearray(b"hi")
ba += "there" Traceback (most recent call last):
File "lineup.py", line 2, in <module>
ba += "there"
TypeError: can't concat str to bytearray 2 SUSPECT #2
lst = [1, 2]
gen = (x for x in [])
lst.extend(gen)
print(lst) Traceback (most recent call last):
File "lineup.py", line 3, in <module>
lst.extend(gen)
~~~~~~~~~~^^^^^
StopIteration 3 SUSPECT #3
import pickle
def make():
class Local: pass
return Local()
pickle.dumps(make()) Traceback (most recent call last):
File "lineup.py", line 7, in <module>
pickle.dumps(make())
~~~~~~~~~~~~^^^^^^^^
_pickle.PicklingError: Can't pickle <class '__main__.make.<locals>.Local'>: it's not found as __main__.Local 4 SUSPECT #4
import pickle
pickle.dumps(lambda x: x) Traceback (most recent call last):
File "lineup.py", line 2, in <module>
pickle.dumps(lambda x: x)
~~~~~~~~~~~~^^^^^^^^^^^^^
_pickle.PicklingError: Can't pickle <function <lambda> at 0x1046b3ce0>: attribute lookup <lambda> on __main__ failed 5 SUSPECT #5
x = 2 ** 10000
float(x) Traceback (most recent call last):
File "lineup.py", line 2, in <module>
float(x)
~~~~~^^^
OverflowError: int too large to convert to float