Namespaces/introspection: collecting sql strings for validation

Aahz aahz at pythoncraft.com
Wed Apr 25 18:27:31 EDT 2007


In article <1hx1epp.80dkmd1wjozaaN%aleax at mac.com>,
Alex Martelli <aleax at mac.com> wrote:
>Aahz <aahz at pythoncraft.com> wrote:
>>Alex:
>>>
>>>But don't put such black magic in production.  The completely different
>>>way is: just don't.
>> 
>> Could you expand on that?  After all, that's exactly what we do to
>> implement a super() that works with classic classes -- and it's certainly
>> production code.
>
>Personally, I'd much rather give up super (not a big loss) and classic
>classes (a substantial net gain:-) than have to maintain such "black
>magic" in a production environment. Explicit is better than implicit,
>&c.

This application was started with Python 1.4.  We still use Python 2.2,
which has some subtle but critical differences with the way new-style
classes are handled in 2.3+.  Using super() makes our plugin model work;
otherwise, we'd have to switch to a non-cooperative mechanism for calling
plugin hooks.  That would have some advantages, of course, but so much
code would need rewriting, and managing the calling of plugin hooks would
require creating an API registry.

The world is not always a simple place....
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"...string iteration isn't about treating strings as sequences of strings, 
it's about treating strings as sequences of characters.  The fact that
characters are also strings is the reason we have problems, but characters 
are strings for other good reasons."  --Aahz



More information about the Python-list mailing list