(Serious?) package namespace problem (and a proposal)
Nhi Vanye
offer at sgi.com
Wed Jun 28 22:26:13 EDT 2000
$ from NO_SPAM_hzhu at knowledgetrack_dot_com -#96739 | sed "1,$s/^/> /"
>
>
>
>Therefore I think it is desirable for python to provide a mechanism for
>programmers to describe absolute path of imports. Like on Unix, writing
>/bin/sh in stead of sh in a script will guarantee its behavior no matter
>where it is run and what the current PATH the user has.
>
>My previous proposal was to use
>import pythonroot.AAA
>but in analogy with Unix paths maybe a syntax like
>import .AAA
>is even better. (BTW, this is the scheme used in DNS configurations for
>distinguishing qualified and unqualified domain names.)
In another thread I suggested using
import global.AAA
(what happens if someone wants to call a package pythonroot, we've
suddenly invented a new reserved word ?)
I'm worried that the . syntax is special-cased/it can be easily missed.
>Huaiyu Zhu hzhu at users.sourceforge.net
>Matrix for Python Project http://MatPy.sourceforge.net
richard.
--
Richard Offer Widget FAQ --> http://reality.sgi.com/widgetFAQ
MTS-Core Design (Motif)
___________________________________________http://reality.sgi.com/offer
More information about the Python-list
mailing list