Re: [Pyobjc-dev] NibLoader.py: parsing nibs at runtime
Brought to you by:
ronaldoussoren
From: Jack J. <Jac...@or...> - 2002-11-15 23:27:57
|
On vrijdag, nov 15, 2002, at 23:04 Europe/Amsterdam, bb...@ma... wrote: > On Friday, November 15, 2002, at 02:30 PM, Ronald Oussoren wrote: >>> class WSTApplicationDelegate (NibLoader): >> This should be ... (NibLoader.NibLoader): > > Doh! Defeated by the Obvious Yet Again! > > Instead of calling it 'NibLoader', how about NibSuper, NibAbstract, > NibBase, or something else other than the module name? I have been > burned by this-- and have helped folks new to Python-- on this exact > same kind of a problem *so many times* now, that I really try to avoid > this kind of namespace overloading as much as possible. It's standard Python idiom (if a module has a main class give them the same name), but now that the bases for a class can be pretty much everything that is callable, in stead of only modules as it used to be, it can lead to strange errors. But I think NibLoader should be able to detect this situation (not sure though, I don't have the code handy, and I still haven't read Just's message which will hopefully finally make me understand metaclasses). -- - Jack Jansen <Jac...@or...> http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - |