On 05/08/2015 06:26 PM, Alan Gauld wrote:
On 08/05/15 19:10, Jim Mooney Py3.4.3winXP wrote:
On 7 May 2015 at 18:42, Dave Angel wrote:
Python doesn't have pointers
So what is the difference between a python name and a pointer?
OK, This could get deepo.
Lets start with the supoerficial...
On 08/05/15 19:10, Jim Mooney Py3.4.3winXP wrote:
On 7 May 2015 at 18:42, Dave Angel wrote:
Python doesn't have pointers
So what is the difference between a python name and a pointer?
OK, This could get deepo.
Lets start with the supoerficial...
A pointer (in most languiages) is a named
On 05/08/2015 02:10 PM, Jim Mooney Py3.4.3winXP wrote:
On 7 May 2015 at 18:42, Dave Angel wrote:
Python doesn't have pointers
So what is the difference between a python name and a pointer? I'm a bit
fuzzy on that.
What's the difference between a painting of Obama and a living state
Senat
On 7 May 2015 at 18:42, Dave Angel wrote:
> Python doesn't have pointers
So what is the difference between a python name and a pointer? I'm a bit
fuzzy on that.
--
Jim
"What a rotten, failed experiment. I'll start over. Maybe dogs instead of
monkeys this time." --God
___
On Thu, May 07, 2015 at 12:15:42PM -0700, Jim Mooney Py3.4.3winXP wrote:
> I find this a bit confusing. Since the ID of K remains the same, so it's
> the same object, why isn't it increasing each time. i.e, 20, 30, 40,. I
> understand that it's immutable but doesn't that mean K is created each time
On 05/07/2015 07:51 PM, Dave Angel wrote:
On 05/07/2015 04:54 PM, Jim Mooney Py3.4.3winXP wrote:
On 7 May 2015 at 13:03, Emile van Sebille wrote:
Compare to:
def testid(K=100):
K += 10
return 'the ID is', id(K), K
Ah, thanks. I forgot small integers are saved in a table. I
On 05/07/2015 05:25 PM, Alan Gauld wrote:
On 07/05/15 21:54, Jim Mooney Py3.4.3winXP wrote:
Ah, thanks. I forgot small integers are saved in a table. I was
looking at
a demo that pointers to defaults in function parameters are persistent.
But remember they variables are NOT pointers.
They are
On 05/07/2015 04:54 PM, Jim Mooney Py3.4.3winXP wrote:
On 7 May 2015 at 13:03, Emile van Sebille wrote:
Compare to:
def testid(K=100):
K += 10
return 'the ID is', id(K), K
Ah, thanks. I forgot small integers are saved in a table. I was looking at
a demo that pointers to def
On 05/07/2015 03:15 PM, Jim Mooney Py3.4.3winXP wrote:
I find this a bit confusing. Since the ID of K remains the same, so it's
the same object, why isn't it increasing each time. i.e, 20, 30, 40,. I
understand that it's immutable but doesn't that mean K is created each time
in local scope so it
On 05/07/2015 04:03 PM, Emile van Sebille wrote:
On 5/7/2015 12:15 PM, Jim Mooney Py3.4.3winXP wrote:
I find this a bit confusing. Since the ID of K remains the same, so it's
the same object, why isn't it increasing each time. i.e, 20, 30, 40,. I
understand that it's immutable but doesn't that m
On 07/05/15 21:54, Jim Mooney Py3.4.3winXP wrote:
Ah, thanks. I forgot small integers are saved in a table. I was looking at
a demo that pointers to defaults in function parameters are persistent.
But remember they variables are NOT pointers.
They are keys in a dictionary. Very different.
Als
On 7 May 2015 at 13:03, Emile van Sebille wrote:
> Compare to:
>
> def testid(K=100):
> K += 10
> return 'the ID is', id(K), K
>
Ah, thanks. I forgot small integers are saved in a table. I was looking at
a demo that pointers to defaults in function parameters are persistent. It
use
On 5/7/2015 12:15 PM, Jim Mooney Py3.4.3winXP wrote:
I find this a bit confusing. Since the ID of K remains the same, so it's
the same object, why isn't it increasing each time. i.e, 20, 30, 40,. I
understand that it's immutable but doesn't that mean K is created each time
in local scope so it sh
I find this a bit confusing. Since the ID of K remains the same, so it's
the same object, why isn't it increasing each time. i.e, 20, 30, 40,. I
understand that it's immutable but doesn't that mean K is created each time
in local scope so it should have a different ID each time?
def testid(K=10):
14 matches
Mail list logo