I don't fully understand what is going on here. Why does the returned string from repr evaluate to False? If anyone can expand on what I'm not understanding here, that would be really appreciated.
class Bag(object):
def __init__(self, iter_vals = []):
self.iter_vals = iter_vals
def __repr__(self):
return f"Bag({str(self.iter_vals)})"
if __name__ == '__main__':
b = Bag(['d','a','b','d','c','b','d'])
print(eval(repr(b)) == b)
>>> False