[pypy-dev] How are namespaces implemented in rpython?

Alex Gaynor alex.gaynor at gmail.com
Tue Dec 6 05:37:32 CET 2011


On Mon, Dec 5, 2011 at 11:36 PM, Alexander Golec <thejfasi at gmail.com> wrote:

> Impressive. I would think that there would be some trouble with names that
> may or may not be included in the namespace depending on execution of the
> module. The module would still need to be executed at runtime, but I'm
> guessing the names that it might produce are bounded?
>
> Alex
>
>
>
> On Dec 5, 2011, at 11:33 PM, Alex Gaynor wrote:
>
>
>
> On Mon, Dec 5, 2011 at 11:04 PM, Alexander Golec <thejfasi at gmail.com>wrote:
>
>> Hey all,
>>
>> I'm preparing a presentation for Alfred Aho at Columbia, and I'd like to
>> ask how are namespaces translated during the translation phase. Are they
>> implemented dynamically, or are they actually compiled down to C?
>>
>> Alex
>> _______________________________________________
>> pypy-dev mailing list
>> pypy-dev at python.org
>> http://mail.python.org/mailman/listinfo/pypy-dev
>>
>
> If I understand you correctly, you're asking if the notion of a module (or
> namespace) exists at runtime for an RPython program, or whether that's
> resolved at compile time?
>
> The answer to that question is that all imports in RPython are resolved at
> compile time, and thus modules are a purely compile time concept.
>
> Alex
>
> --
> "I disapprove of what you say, but I will defend to the death your right
> to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
> "The people's good is the highest law." -- Cicero
>
>  _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> http://mail.python.org/mailman/listinfo/pypy-dev
>
>
>
During compilation it is statically known what names exist within a module,
this is one of the restrictions of RPython.

Alex

-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20111205/518e86f0/attachment-0001.html>


More information about the pypy-dev mailing list