I have to say I agree, up to a point. I think that monkeypatching goes right to the very heart of the language - Python was written not just to allow it, but it's opperation almost encorages it (Sort of). HOWEVER, I am somewhat against a monkeypatch being made part of the core distribution (No disrespect to the authors of such products - me included), these should be optional downloads, up to the point that the code is rolled into the core codebase. The call profiler seems to be a very popular feature, and it seems to provide very useful information. It's not rock solid yet (I am sure I even remember it's author saying this a day or so ago), but it will be, and that is the point that it should be considered for rolling in - Possibly to replace the existing debug/profiling stuff, that seems to be somewhat overshadowed by it... Just my 2c (Or 0.02 E, take you pick) Adrian... -- The difficulty of tactical maneuvering consists in turning the devious into the direct, and misfortune into gain. - Sun Tzu ----- Original Message ----- From: "Chris Withers" <chrisw@nipltd.com> To: "seb bacon" <seb@jamkit.com> Cc: "Richard Jones" <rjones@ekit-inc.com>; "Casey Duncan" <casey_duncan@yahoo.com>; "Anthony Baxter" <anthony@ekit-inc.com>; <zope-dev@zope.org> Sent: Monday, March 04, 2002 12:54 PM Subject: [Zope-dev] Re: MonkeyPatching in the Core (was: Zope 2.6 planning)
seb bacon wrote:
Pros - a tiny performance gain Cons - unpredictable interaction with future products;
I'd rephrase that as a pro:
Ability to work with products of the future, without the need to understand their inner workings...
not a well-known method of distributing products;
Urm... that I gotta disagree with... Tehre are now many such products for Zope...
not easily discoverable
What do you mean by discoverable?
But perhaps my 'cons' are misplaced? Mostly, I'm uneasy that someone looking at ZPublisher code would have no way of knowing that CallProfiler hooks into it if it were monkeypatched.
Yeah they would, 'cos CallProfiler will be well documented beforeit hits a release and will onyl come into play if explicity enabled. And if you explicitly enable it, you should read the documentation first...
cheers,
Chris
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )