On Tue, Dec 25, 2018 at 10:25:50PM -0500, Avi Gross wrote: > class chainable_list(list): > """Same as list but sort() can now be chained""" > def chainsort(this, *args, **kwargs): > this.sort(*args, **kwargs) > return this
In Python, it is traditional to use "self" rather than "this" as the instance parameter. Using "this" is not an error, but you can expect a lot of strange looks. Like a Scotsman in a kilt wandering down the middle of Main Street, Pleasantville USA. -- Steve _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor