[Pythonmac-SIG] Reorganize the Carbon package?

Samuel Smith smithsm@samuelsmith.org
Mon, 12 Aug 2002 10:34:59 -0600


>
>
> 4. In addition to (3) we actually create a module Carbon.Carbon that 
> imports everything from every Carbon module in the system. Advantage is 
> that by using this module everything is 100% compatible with the Apple 
> documentation. Disadvantage is that the namespace for this module is 
> mindbogglingly large. And, if you really need only one single Carbon call 
> you will still drag in all the extension modules, etc.
>
I am just naive enough to wonder why the Carbon module can't be a 
hierarchical package of modules instead of just one module. That way one 
only needs import the parts needed. Of course if someone needed most of 
carbon they would import the top level of the package __all__ and get  the 
whole namespace, but is than any different than building it in?

> 5. In stead of (4) we might be able to come up with some lazy dynamic 
> scheme. I.e. the module (or module-like object) Carbon.Carbon doesn't 
> import anything initially, but when you try to access, say, Carbon.Carbon.
> NewWindow it will somehow find out that this should come from Carbon.Win 
> and at that point do the actual import (and populating its own namespace 
> with all its symbols). Advantage is the same as for (4). Disadvantage is 
> that I don't know how to do this:-), "from Carbon.Carbon import *" may be 
> a problem, for instance, and that introspection (think of the IDE class 
> browser) will work in a funny way.
wouldn't the setup functions at each level of the package hierarchy 
obviate the need for a lazy scheme.

> --
> - Jack Jansen        <Jack.Jansen@oratrix.com>        
> http://www.cwi.nl/~jack -
> - If I can't dance I don't want to be part of your revolution -- Emma 
> Goldman -
>
>
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
>
>
**************************************************************************
************************
Samuel M. Smith Ph.D.
President & Founder
Adept Systems Incorporated
360 W. 920 N.  Orem, Utah 84042
801.226.7607 x112 (voice) 801.226.7608 (fax)
mailto: smithsm@adeptsystemsinc.com (email)
http://www.adeptsystemsinc.com/ (web)
**************************************************************************
***********************
NOTICE: This electronic mail message, together with any attachments 
contains information
that may be copyrighted, confidential, proprietary, and/or legally 
privileged of and/or by
Adept Systems Incorporated. This  electronic mail message is intended 
solely for the use of
the individual or entity originally named as the intended recipient. If 
you are not the intended
recipient, and have received this message in error, please return 
immediately this message
by email and delete it.
**************************************************************************
*************************