[Pythonmac-SIG] What to do about missing toolbox routines

John W Baxter jwblist@olympus.net
Mon, 13 Dec 1999 23:52:20 -0800


At 12:35 +0100 12/13/99, Jack Jansen wrote:
>> Alternative 3:  export boolean hasToolboxFoo for every Foo which is weak
>> linked (or every such call for which there isn't a Gestalt call which will
>> detect presence/absence).  That's a rather verbose name...since we're
>> looking at modules it could be perhaps reduced to hasFoo without name
>> collision problems.
>
>Hmm, that's an interesting angle! I'll think about this a bit more, it may be
>that a different interface (for instance a is_implemented("ToolBoxCallName")
>method) might be easier to implement (and cause less namespace clutter),
>though.

The is_implemented("ToolBoxCallName") looks better than "my" individual
booleans.  Whether it's better than alternative 1 is another question
(which pretty much goes to whether one prefers exceptions after the fact to
testing before...this one prefers exceptions, partly because pre-flighting
can be accomplished using them).

  --John
-- 
John Baxter   jwblist@olympus.net      Port Ludlow, WA, USA