On Oct 6, 2008, at 8:20 PM, Lisandro Dalcin wrote:

> On Mon, Oct 6, 2008 at 9:41 PM, Greg Ewing  
> <[EMAIL PROTECTED]> wrote:
>> Robert Kern wrote:
>>
>>> I'm wondering if the statement "import cython"
>>> might actually import Cython/__init__.py on some case-insensitive  
>>> file system.
>>
>> On MacOSX (case-insensitive) it seems to be able
>> to distinguish between them.

MacOSX HSF+ is case preserving, case intensive.

> Perhaps __import__ black magic? Python/import.c is not something easy
> to parse, but I bet packages take precedence over modules (or the
> other way)... Does this make sense?

Yes, that is the case.

> BTW, Greg, could you write an abc.py file and other ABC.py (OSX is
> also case-preserving, right?), add some (different) stuff in each, and
> tell all us what do you get doing 'import abc' and 'import ABC' ? Some
> time ago
> Brian Granger warned me about using an MPI.pxd file and other mpi.pxd,
> because this could be really problematic on OSX.
>
> As R. Kern commented in previous mail, the import machinery is not a
> something we should be playing games or assuming 'standard' behavior.
> And what would happen if Cython is shipped in something like a
> 'Portable Python' bundle living on USB stick with FAT ? And perhaps in
> the future Guido will change his mind and make Python a
> case-insensitive language... (just joking, but I remember people
> asking for this in the past on Python-Dev. You know, "Real Programmers
> use Fortran" ;-) )

The current way works no matter which it chooses first--as long as it  
can find cython.py or Cython (and Python's going to be horribly  
broken if either of those fail) then it just works.

- Robert


_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to