Ulli Horlacher <frams...@rus.uni-stuttgart.de> writes:
>> tarfile.TarFile.extractall = new_extractall
>
> This is more easy than I could imagined :-) It is in my Python notes,
> now.

This is called "duck punching" or "monkey patching" and sometimes it's
necessary, but it's something of an antipattern since the module could
change under you between versions, and that sort of thing.  If you have
to do it, then fine; but if you have a choice, it's preferable to avoid
that sort of thing.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to