[Zope-dev] zope.test.doctest made into monkey-patches

Wolfgang Schnerring ws at gocept.com
Wed Apr 21 01:48:14 EDT 2010


* Jim Fulton <jim at zope.com> [2010-04-20 20:35]:
> On Tue, Apr 20, 2010 at 4:46 AM, Lennart Regebro <regebro at gmail.com> wrote:
>> And here is another interesting experiment:
>> svn+ssh://regebro@svn.zope.org/repos/main/zope.testing/branches/regebro-doctest-patching
>> It replaces the custom doctest.py with monkey-patches.
>>
>> Benefits: We don't have to maintain a separate  doctest.py, and we get
>> the bugfixes from Python.
>
> Strong -1.
>
> Monkey patching should be used as a last resort. Monkey
> patching the standard library is likely to make us look like
> jack asses.

That might be so. I don't share that position, but I have a different
point that I want to make: Regardless of whether monkey-patching the
stdlib is or isn't a Bad Thing(tm), I think Lennart's approach is an
*improvement* over the previous situation where we copied a file from the
stdlib wholesale[1] -- in my opinion that's definitely worse than a
monkey-patch.

Wolfgang

[1] I know, I know, it was actually the other way around. But still.



More information about the Zope-Dev mailing list