#NEWLINE# def _wrapture( orig ) : #NEWLINE# #INDENT# '\n    Returns a new method that wraps orig (the original method) with\n    something that first calls on_modify from the\n    instance. _ListWrapper uses this to wrap all methods that modify\n    the list.\n    ' #NEWLINE# def foo( * args ) : #NEWLINE# #INDENT# obj = args [ 0 ] #NEWLINE# obj . on_modify ( ) #NEWLINE# return orig ( * args ) #NEWLINE# #UNINDENT# return foo