On Feb 13, 2009, at 7:52 AM, Lisandro Dalcin wrote:

> Some time ago I reported that the following:
>
> from foo import Bar
> from foo cimport Bar
>
> do not put 'Bar' in the module dicti. Commenting the lines below seems
> to solve the issue. Am I missing something (I bet the answer is yes)?
> Any comments?

Hmm... those lines were added in changeset 1309 because of issues  
with compiling .py files. I think it may change the name to be an  
ordinary name, rather than a cimported one, but I'm not sure.

Does Cython compile itself after this patch? Also, rather than  
commenting stuff out, if it's not needed it should just be deleted.

> diff -r 1771db44498b Cython/Compiler/Nodes.py
> --- a/Cython/Compiler/Nodes.py        Thu Feb 12 18:22:15 2009 -0200
> +++ b/Cython/Compiler/Nodes.py        Fri Feb 13 13:42:23 2009 -0200
> @@ -4600,8 +4600,9 @@
>                          break
>              else:
>                  entry =  env.lookup(target.name)
> -                if entry.is_type and entry.type.name == name and
> entry.type.module_name == self.module.module_name.value:
> -                    continue # already cimported
> +                #if entry.is_type and entry.type.name == name and
> entry.type.module_name == self.module.module_name.value:
> +                #    continue # already cimported
> +                #    pass
>                  self.interned_items.append(
>                      (env.intern_identifier(name), target))
>                  target.analyse_target_expression(env, None)
>
>
> -- 
> 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

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

Reply via email to