Hmmm... this makes sense now (the distinction between '.' and ':'). Also my package.module example was referring to the case where there is no subpackage --which now makes sense because of the above.
I still think the docs could be better worded, but no more gripes from me :-)... C. >From: Geoffrey Talvola <[EMAIL PROTECTED]> >To: "Costas Malamas" <[EMAIL PROTECTED]>, >[EMAIL PROTECTED] >Subject: Re: [Webware-discuss] PSP bug in importing subpackages? >Date: Tue, 18 Dec 2001 09:17:24 -0500 > >On Tuesday December 18, 2001 09:04 am, Costas Malamas wrote: > > Yes, it does (I just tested it)... I didn't know this, as it is not > > documented AFAICanTell. > > > > Hmmm... this is not consistent: I mean, if you can do that, why not >keep > > the full python idiom and do: > > > > <%@ page imports="package.subpackage.module"%> > >You can. It just doesn't mean quite the same thing -- see below. > > > > > or for that matter: > > > > <%@ page imports="package.module"%> > >How can you possibly do that? It doesn't specify which subpackage to >import >from. > > > > > It's just two lines of code away... > > > > Python, beautifully, blurs the distinction between packages, subpackages > > and modules (and classes and methods and attributes). Why should PSP >break > > the '.' chain? > >You need a way to distinguish between these two imports: > >from package.subpackage import module >import package.subpackage.module > >These correspond to: > ><%@ page imports="package.subpackage:module"%> ><%@ page imports="package.subpackage.module"%> > >In other words, the colon is the equivalent of the "from X import Y" idiom. >X and Y can include dots if needed. Seems 100% consistent with Python's >imports. > >- Geoff > >_______________________________________________ >Webware-discuss mailing list >[EMAIL PROTECTED] >https://lists.sourceforge.net/lists/listinfo/webware-discuss _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss