Changing return value for mutating list methods


Category:
Scripts
Python
Requirements:
Seller:
Price:
-
System:
Rating:
4.9
License:

Description - Changing return value for mutating list methods



Mutating list methods such as `append` or `extend` return None instead of the (mutated) list itself. Sometimes, this is not the desired behaviour. The Python%26start%3D75"> Discussion on comp.lang.python resulted in the following solution. The shown code is my own, while two other solutions are presented in the discussion.



More in Python-Changing return value for mutating list methods

Return Value List Methods Mutating List Methods