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
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
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
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
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
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 =