Is there opportunity to join my types using:
str.join()
I have my class:
class Slice(object):
def __init__(self, start, end):
self.__start = start
self.__end = end
def __str__(self):
return '{0}:{1}'.format(self.__start, self.__end)
def __repr__(self):
return "'{}'".format(str(self))
What should i override to perform this kind of code:
','.join(Slice(1, 2), Slice(3, 4))
And get a result like this:
'1:2,3:4'
Nothing.