Re: [Tutor] What is a namespace? What is meant by "A namespace is a mapping from names to objects"

2013-12-09 Thread Marc Tompkins
On Sun, Dec 8, 2013 at 8:46 PM, Varuna Seneviratna < varunasenevira...@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

Re: [Tutor] What is a namespace? What is meant by "A namespace is a mapping from names to objects"

2013-12-09 Thread Alan Gauld
On 09/12/13 04:46, Varuna Seneviratna wrote: do not understand what is meant by "A /namespace/ is a mapping from names to objects". How I understand to be a namespace is a particular space within which a particular name is unique. That's correct. But a name on its own can refer to anything. Bu

Re: [Tutor] What is a namespace? What is meant by "A namespace is a mapping from names to objects"

2013-12-09 Thread spir
On 12/09/2013 05:46 AM, Varuna Seneviratna wrote: Let’s begin with some definitions. A *namespace* is a mapping from names to objects. Most namespaces are currently implemented as Python dictionaries, but that’s normally not noticeable in any way (except for performance), and it may change in t

Re: [Tutor] What is a namespace? What is meant by "A namespace is a mapping from names to objects"

2013-12-09 Thread Steven D'Aprano
On Mon, Dec 09, 2013 at 10:16:30AM +0530, Varuna Seneviratna wrote: > I do not understand what is meant by "A *namespace* is a mapping from names > to objects". How I understand to be a namespace is a particular space > within which a particular name is unique.For a example within the space set >

Re: [Tutor] What is a namespace? What is meant by "A namespace is a mapping from names to objects"

2013-12-09 Thread Amit Saha
On Mon, Dec 9, 2013 at 2:46 PM, Varuna Seneviratna wrote: >> Let’s begin with some definitions. >> >> A namespace is a mapping from names to objects. Most namespaces are >> currently implemented as Python dictionaries, but that’s normally not >> noticeable in any way (except for performance), and

[Tutor] What is a namespace? What is meant by "A namespace is a mapping from names to objects"

2013-12-09 Thread Varuna Seneviratna
> > Let’s begin with some definitions. > > A *namespace* is a mapping from names to objects. Most namespaces are > currently implemented as Python dictionaries, but that’s normally not > noticeable in any way (except for performance), and it may change in the > future. Examples of namespaces are: t