Re: reference vs. name space question

2010-10-10 Thread Steven D'Aprano
On Sat, 09 Oct 2010 21:00:45 -0700, chad wrote: > Maybe I'm being a bit dense, but how something like > > [cdal...@localhost oakland]$ python > Python 2.6.2 (r262:71600, May 3 2009, 17:04:44) [GCC 4.1.1 20061011 > (Red Hat 4.1.1-30)] on linux2 Type "help", "copyright", "credits" or > "license" f

Re: reference vs. name space question

2010-10-09 Thread Ben Finney
chad writes: > Maybe I'm being a bit dense, but how something like > > [cdal...@localhost oakland]$ python > Python 2.6.2 (r262:71600, May 3 2009, 17:04:44) > [GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> spam > T

Re: reference vs. name space question

2010-10-09 Thread chad
On Oct 9, 5:52 pm, Steven D'Aprano wrote: > On Sat, 09 Oct 2010 12:44:29 -0700, chad wrote: > > Given the following... > > > [cdal...@localhost oakland]$ python > > Python 2.6.2 (r262:71600, May  3 2009, 17:04:44) [GCC 4.1.1 20061011 > > (Red Hat 4.1.1-30)] on linux2 Type "help", "copyright", "cre

Re: reference vs. name space question

2010-10-09 Thread Steven D'Aprano
On Sat, 09 Oct 2010 12:44:29 -0700, chad wrote: > Given the following... > > [cdal...@localhost oakland]$ python > Python 2.6.2 (r262:71600, May 3 2009, 17:04:44) [GCC 4.1.1 20061011 > (Red Hat 4.1.1-30)] on linux2 Type "help", "copyright", "credits" or > "license" for more information. cla

Re: reference vs. name space question

2010-10-09 Thread Ben Finney
chad writes: > >>> print one > <__main__.foo instance at 0xb7f3a2ec> > >>> print two > <__main__.foo instance at 0xb7f3a16c> > >>> one.x > 1 > > > Is 'one' a reference or a name space? Yes. It's a reference to an instance of the ‘foo’ type. That instance is also a namespace; in other words, it

reference vs. name space question

2010-10-09 Thread chad
Given the following... [cdal...@localhost oakland]$ python Python 2.6.2 (r262:71600, May 3 2009, 17:04:44) [GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> class foo: ... x = 1 ... y = 2 ... >>> one = foo() >>> two =