Hi! Please have a look at the following method cited from Lib/UserList.py: def __radd__(self, other): if isinstance(other, UserList): # <-- ? return self.__class__(other.data + self.data) # <-- ? elif isinstance(other, type(self.data)): return self.__class__(other + self.data) else: return self.__class__(list(other) + self.data) The reference manual tells about the __r*__ methods: """These functions are only called if the left operand does not support the corresponding operation.""" So if the left operand is a UserList instance, it should always have a __add__ method, which will be called instead of the right operands __radd__. So I think the condition 'isinstance(other, UserList)' in __radd__ above will always evaluate to False and so the two lines marked with '# <-- ?' seem to be superfluous. But 'UserList' is so mature: Please tell me what I've oveerlooked before I make a fool of myself and submit a patch removing this two lines. Regards, Peter -- Peter Funk, Oldenburger Str.86, D-27777 Ganderkesee, Germany, Fax:+49 4222950260 office: +49 421 20419-0 (ArtCom GmbH, Grazer Str.8, D-28359 Bremen)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4