[Tutor] What is a namespace? What is meant by "A namespace is a mapping from names to objects"
Marc Tompkins
marc.tompkins at gmail.com
Mon Dec 9 18:46:10 CET 2013
On Sun, Dec 8, 2013 at 8:46 PM, Varuna Seneviratna <
varunaseneviratna at gmail.com> wrote:
> But what is meant by "A *namespace* is a mapping from names to objects"
>
Steven touched on this, but I'd like to emphasize: in Python, EVERYTHING is
an object - variables, functions, integers, strings, you name it. (Even
names and namespaces, but that might be getting a little TOO meta.)
When I first came to Python, after years of languages where some things are
objects and other things aren't, this concept gave me a little trouble;
once I got my head around it, namespaces made sense too.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20131209/c136c967/attachment.html>
More information about the Tutor
mailing list