[Python-ideas] Namespaces and modules [was Deprecate the round builtin]

Nick Coghlan ncoghlan at gmail.com
Mon Oct 1 20:35:47 CEST 2012


On Mon, Oct 1, 2012 at 9:42 PM, Mark Adam <dreamingforward at gmail.com> wrote:
> On Mon, Oct 1, 2012 at 1:05 AM, Steven D'Aprano <steve at pearwood.info> wrote:
>> I'm not sure why "built-in module" is a better term for something which
>> I gather is a separate namespace within a module, so you can have:
>
> Yeah, I'm not really sure it makes sense to call it a module at all.
> I was sort of capitulating about the use of the word "module".   It's
> not like you can do "import __builtins__" in the interpreter, so if
> one is going to call it a module (like the interpreter currently
> does), one should see that it is a very special exception of the word.

"import __builtin__" in Python 2, "import builtins" in Python 3. The
contents of those modules are implicitly made available to all Python
code running in that process.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-ideas mailing list