Re: modifying standard library functionality (difflib)

2010-06-24 Thread Paul Rubin
Bruno Desthuilliers writes: > "patching source code" canonically means "physically" modifying the > original source file. Monkeypatching - which can only be done in some > dynamic languages - is what you're doing above, ie dynamically > replacing a given feature at runtime. I came across a less p

Re: modifying standard library functionality (difflib)

2010-06-24 Thread Vlastimil Brom
2010/6/24 Bruno Desthuilliers : > Vlastimil Brom a écrit : > > "patching source code" canonically means "physically" modifying the original > source file. Monkeypatching - which can only be done in some dynamic > languages - is what you're doing above, ie dynamically replacing a given > featur

Re: modifying standard library functionality (difflib)

2010-06-24 Thread Bruno Desthuilliers
Vlastimil Brom a écrit : Many thanks for your insights! Just now, I am the almost the only user of this script, hence the consequences of version mismatches etc. shouldn't (directly) affect anyone else, fortunately. So far so good. However, I'd like to ask for some clarification about monkey

Re: modifying standard library functionality (difflib)

2010-06-24 Thread Vlastimil Brom
2010/6/24 Bruno Desthuilliers : > Vlastimil Brom a écrit : >> >> Hi all, >> I'd like to ask about the most reasonable/recommended/... way to >> modify the functionality of the standard library module (if it is >> recommended at all). > > ... >> - I guess, it wouldn't be recommended to directly repl

Re: modifying standard library functionality (difflib)

2010-06-24 Thread Bruno Desthuilliers
Vlastimil Brom a écrit : Hi all, I'd like to ask about the most reasonable/recommended/... way to modify the functionality of the standard library module (if it is recommended at all). (snip) However, I'd like to ask, how to best maintain this modified functionality in the sourcecode. I tried