You can implement the __str__(self) method to return a string. Is there an analogue of __list__(self) ? ( __list__ does not work!) Is there a .toList () path?
__str__(self)
__list__(self)
__list__
There is no direct analogue, but list() is implemented by iterating over the argument. So use iterator protocol ( __iter__() ) or related indexing ( __len__() and __getitem__() ).
list()
__iter__()
__len__()
__getitem__()