[Python-Dev] New Import Hooks PEP, a first draft (and req. for PEP #)
Jack Jansen
Jack.Jansen@oratrix.com
Sat, 21 Dec 2002 14:57:24 +0100
On vrijdag, dec 20, 2002, at 21:19 Europe/Amsterdam, Just van Rossum
wrote:
> Thomas Heller wrote:
>
>> Looks ok to me, although I would prefer to write
>>
>> path = os.sep.join(__name__.split(".") + ["wininst.exe"])
>> or
>> path = os.path.join(*__name__.split(".") + ["wininst.exe"])
>
> Much better. I think I'd prefer the first, mostly because
> os.path.join()
> might do more magic than needed.
But that magic would actually be needed for MacOS9 pathnames.
os.path.join(*['foo', 'bar']) will correctly return ':foo:bar', whereas
os.sep.join will return 'foo:bar', which is wrong.
Not that we should care all that much anymroe about MacOS9 pathnames,
but still...
--
- 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 -