How do you override list(object)
where object
is an object defined by a class. Can you do something like
class foo:
def __list__(self):
return [None] # In my real code I want it to return a object
It would also be helpful if someone found a question with the answer I'm looking for.