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. >
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? 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" ;-) ) -- Lisandro Dalcín --------------- Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594 _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
