"J. Clifford Dyer" wrote:
> This thread is bleedin' demised.
No, you have stunned it.
Delicate threads stun easily.
To get back to the original question, namely how to teach
the concept of a python variable, I would probably take
a harder look at the "wandering names" analogy. I think it
wa
On Nov 28, 8:35 am, Aaron Watters <[EMAIL PROTECTED]> wrote:
> On Nov 27, 5:31 pm, MonkeeSage <[EMAIL PROTECTED]> wrote:
>
> > Of course. But then it really depends on the teaching methodology,
> > doesn't it? There is no reason (well, barring the restraints of the
> > curriculum vitea), that one s
"Chris Mellon" <[EMAIL PROTECTED]> writes:
> Whether you like it or not, the term "pointer" has a specific common
> meanings. They do not mean "any means by which you may reference a
> value". "variable" is certainly less clear and is used much more
> loosely, but in the specific context of compa
On Wed, Nov 28, 2007 at 11:23:42AM -0600, Chris Mellon wrote regarding Re: How
to Teach Python "Variables":
>
> On Nov 28, 2007 10:57 AM, hdante <[EMAIL PROTECTED]> wrote:
> > On Nov 28, 2:12 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> > &g
On Nov 28, 2007 10:57 AM, hdante <[EMAIL PROTECTED]> wrote:
> On Nov 28, 2:12 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> >
> > Right. Python variables are pointers, except for all the ways that
> > they are different. By the same criteria, they are also puppies. Give
> > it a rest.
>
> I'm so
On Nov 28, 2:12 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
>
> Right. Python variables are pointers, except for all the ways that
> they are different. By the same criteria, they are also puppies. Give
> it a rest.
I'm sorry if your notion of pointer is incorrect. A pointer (or, more
formally,
On Nov 28, 2:06 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote:
>
> > That's right. Languages may have arbitrary sets of operations
> > defined for their variables. There's nothing wrong with that.
>
> No, arbitrary operations would be useless.
>
1) You may convince a big company to add you newly dev
On Nov 28, 2007 9:51 AM, hdante <[EMAIL PROTECTED]> wrote:
> On Nov 28, 1:42 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> > On 2007-11-28, hdante <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > On Nov 28, 1:09 am, Steven D'Aprano
> > ><[EMAIL PROTECTED]> wrote:
> > >> On Tue, 27 Nov 2007 10:21:36 -08
On 2007-11-28, hdante <[EMAIL PROTECTED]> wrote:
> On Nov 28, 1:42 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote:
>> On 2007-11-28, hdante <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> > On Nov 28, 1:09 am, Steven D'Aprano
>> ><[EMAIL PROTECTED]> wrote:
>> >> On Tue, 27 Nov 2007 10:21:36 -0800, hdante wrote:
On Nov 28, 1:42 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> On 2007-11-28, hdante <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Nov 28, 1:09 am, Steven D'Aprano
> ><[EMAIL PROTECTED]> wrote:
> >> On Tue, 27 Nov 2007 10:21:36 -0800, hdante wrote:
> >> > Python variables are pointers and that's it.
>
> >
On 2007-11-28, hdante <[EMAIL PROTECTED]> wrote:
> On Nov 28, 1:09 am, Steven D'Aprano
><[EMAIL PROTECTED]> wrote:
>> On Tue, 27 Nov 2007 10:21:36 -0800, hdante wrote:
>> > Python variables are pointers and that's it.
>>
>> How do I increment a Python variable so that it points to the
>> next addre
On Nov 28, 1:09 am, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> On Tue, 27 Nov 2007 10:21:36 -0800, hdante wrote:
> > Python variables are pointers and that's it.
>
> How do I increment a Python variable so that it points to the next
> address, like I can do with pointers in C, Pascal, and other l
On Nov 27, 5:31 pm, MonkeeSage <[EMAIL PROTECTED]> wrote:
> Of course. But then it really depends on the teaching methodology,
> doesn't it? There is no reason (well, barring the restraints of the
> curriculum vitea), that one should learn topics so complex as to
> require "off-putting" the *real*
none <""atavory\"@(none)"> writes:
> IIRC, I once saw an explanation how Python doesn't have
> "variables" in the sense that, say, C does, and instead has bindings
> from names to objects. Does anyone have a link?
"Variable" is an abstract concept, and it's a slightly different
concept for
On Tue, 27 Nov 2007 10:21:36 -0800, hdante wrote:
> Python variables are pointers and that's it.
How do I increment a Python variable so that it points to the next
address, like I can do with pointers in C, Pascal, and other languages?
--
Steven.
--
http://mail.python.org/mailman/listinfo/
On Nov 27, 2:49 pm, Aaron Watters <[EMAIL PROTECTED]> wrote:
> In practice there is too much to understand all at
> once and in the beginning you have to say "don't worry about that
> right now, consider it magic..." Of course they should
> eventually understand it.
Of course. But then it really
On Nov 27, 2:20 pm, MonkeeSage <[EMAIL PROTECTED]> wrote:
> On Nov 27, 11:50 am, Donn Cave <[EMAIL PROTECTED]> wrote:
> I agree with your point, but I think the distinction is this:
> pedagogical analogies should be truly *analogous* -- they should not
> be "analogies" that are only vaguely si
On Nov 27, 11:50 am, Donn Cave <[EMAIL PROTECTED]> wrote:
> In contrast, I suspect that someone who learns Python concepts
> in terms of explanations like `boxes' or `pointers' or whatnot
> is at some disadvantage while that lasts, like translating a
> foreign language to your own instead of attac
On Nov 27, 2:25 pm, Aaron Watters <[EMAIL PROTECTED]> wrote:
>
> I hope the participants in this thread realize
> that this sort of discussion will cause
> any programming newbie to immediately melt into the
> floor.
All right, answering the original question is good. :-P
1) If the students can
Aurélien Campéas <[EMAIL PROTECTED]> wrote (Sun, 25 Nov
2007 20:09:59 +0100):
> none a écrit :
>
> That's something I've often heard and I don't get it. Somehow I don't
> understand how C variables are not like python bindings (the differences
> being that C variables are statically typed and c
On Nov 27, 2007, at Nov 27:1:21 PM, hdante wrote:
This shouldn't confuse a C programmer if he understands that
assignment changes the pointer address, instead of copying the value:
Coming from C, I found the pointer analogy to work pretty well, but
in my head I always felt that integers (o
On Nov 27, 11:52 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> > I would try to avoid talking
> > in generalities about python variables versus C or
> > lisp or whatever, unless I was teaching an upper division
> > college programming languages survey class.
>
> I disagree, although it's not real
On Nov 26, 7:49 am, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> greg <[EMAIL PROTECTED]> writes:
> > none wrote:
> >> IIRC, I once saw an explanation how Python doesn't have
> >> "variables" in the sense that, say, C does, and instead has bindings
> >> from names to objects.
>
> > If you're talk
In article
<[EMAIL PROTECTED]>,
Aaron Watters <[EMAIL PROTECTED]> wrote:
> I would try to avoid talking
> in generalities about python variables versus C or
> lisp or whatever, unless I was teaching an upper division
> college programming languages survey class.
>
> Instead, I'd fire up the in
On Nov 27, 2007 10:25 AM, Aaron Watters <[EMAIL PROTECTED]> wrote:
> On Nov 27, 10:06 am, hdante <[EMAIL PROTECTED]> wrote:
> > On Nov 25, 5:31 pm, none <""atavory\"@(none)"> wrote:
>
> > And that's it. I think that there is confusion because everything we
> > do with python variables are poi
On Nov 27, 10:06 am, hdante <[EMAIL PROTECTED]> wrote:
> On Nov 25, 5:31 pm, none <""atavory\"@(none)"> wrote:
> And that's it. I think that there is confusion because everything we
> do with python variables are pointer dereferences, except for the
> attribution, that instead of dereferencin
On Nov 25, 5:31 pm, none <""atavory\"@(none)"> wrote:
> Aurélien Campéas wrote:
> > none a écrit :
> >> Hello,
>
> >> IIRC, I once saw an explanation how Python doesn't have
> >> "variables" in the sense that, say, C does, and instead has bindings
> >> from names to objects. Does anyone hav
On 2007-11-26, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hrvoje Niksic wrote:
>> greg <[EMAIL PROTECTED]> writes:
>>
>> > none wrote:
>> >> IIRC, I once saw an explanation how Python doesn't have
>> >> "variables" in the sense that, say, C does, and instead has
>> >> bindings from names to obj
Hrvoje Niksic wrote:
> A C programmer
> told that Python variables internally hold pointers expects this code:
>
> def func(a):
> a = 10
> ...
> func(x)
>
> to change the value of x.
He shouldn't expect that, because that's not what the
equivalent code would do in C. To get that effect in C,
y
Chris Mellon wrote:
> On Nov 26, 2007 1:21 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Hrvoje Niksic wrote:
> > > greg <[EMAIL PROTECTED]> writes:
> > >
> > > > none wrote:
> > > >> IIRC, I once saw an explanation how Python doesn't have
> > > >> "variables" in the sense that, say, C d
On Mon, 26 Nov 2007 21:37:19 +1300, greg wrote:
> none wrote:
>> IIRC, I once saw an explanation how Python doesn't have "variables"
>> in the sense that, say, C does, and instead has bindings from names to
>> objects.
>
> If you're talking to C programmers, just tell them that Python variabl
On Nov 25, 10:36 pm, Ben Finney <[EMAIL PROTECTED]>
wrote:
>
> In addition to the good answers you've had already, I highly recommend
> David Goodger's "Code like a Pythonista" page
> http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html>,
> which contains a very good "cardboard box
On Nov 26, 2007 1:21 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hrvoje Niksic wrote:
> > greg <[EMAIL PROTECTED]> writes:
> >
> > > none wrote:
> > >> IIRC, I once saw an explanation how Python doesn't have
> > >> "variables" in the sense that, say, C does, and instead has bindings
> >
Hrvoje Niksic wrote:
> greg <[EMAIL PROTECTED]> writes:
>
> > none wrote:
> >> IIRC, I once saw an explanation how Python doesn't have
> >> "variables" in the sense that, say, C does, and instead has bindings
> >> from names to objects.
> >
IMHO, this is nonsense. All that variables are (in a
greg <[EMAIL PROTECTED]> writes:
> none wrote:
>> IIRC, I once saw an explanation how Python doesn't have
>> "variables" in the sense that, say, C does, and instead has bindings
>> from names to objects.
>
> If you're talking to C programmers, just tell them that Python
> variables always cont
On Nov 25, 2007 6:19 PM, <"@bag.python.org <"none> wrote:
> IIRC, I once saw an explanation how Python doesn't have "variables" in
> the sense that, say, C does, and instead has bindings from names to
> objects. Does anyone have a link?
Perhaps you mean:
http://effbot.org/zone/python-obje
none wrote:
> IIRC, I once saw an explanation how Python doesn't have "variables"
> in the sense that, say, C does, and instead has bindings from names to
> objects.
If you're talking to C programmers, just tell them that
Python variables always contain pointers. That should
give them the ri
Ben Finney wrote:
> none <""atavory\"@(none)"> writes:
>
>> IIRC, I once saw an explanation how Python doesn't have "variables"
>> in the sense that, say, C does, and instead has bindings from names
>> to objects. Does anyone have a link?
>
> In addition to the good answers you've had already, I
none <""atavory\"@(none)"> writes:
> IIRC, I once saw an explanation how Python doesn't have "variables"
> in the sense that, say, C does, and instead has bindings from names
> to objects. Does anyone have a link?
In addition to the good answers you've had already, I highly recommend
David Goodge
Aurélien Campéas wrote:
> I mean : aren't C variables also bindings from names to objects ?
No, C variables are aliases for memory addresses.
Regards,
Björn
--
BOFH excuse #390:
Increased sunspot activity.
--
http://mail.python.org/mailman/listinfo/python-list
Aahz wrote:
> In article <[EMAIL PROTECTED]>, none <""atavory\"@(none)"> wrote:
>> IIRC, I once saw an explanation how Python doesn't have "variables" in
>> the sense that, say, C does, and instead has bindings from names to
>> objects. Does anyone have a link?
>
> http://starship.python.n
"Aurélien Campéas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I mean : aren't C variables also bindings from names to objects ? Or what
> ?
No, they're not.
In C, when you execute
x = y;
you cause x to become a copy of y. In Python, when you execute
x = y
you ca
In article <[EMAIL PROTECTED]>, none <""atavory\"@(none)"> wrote:
>
> IIRC, I once saw an explanation how Python doesn't have "variables" in
>the sense that, say, C does, and instead has bindings from names to
>objects. Does anyone have a link?
http://starship.python.net/crew/mwh/hacks/ob
Aurélien Campéas wrote:
> none a écrit :
>> Hello,
>>
>> IIRC, I once saw an explanation how Python doesn't have
>> "variables" in the sense that, say, C does, and instead has bindings
>> from names to objects. Does anyone have a link?
>>
>> Thanks,
>>
>> Ami
>
> That's something
Aurélien Campéas schrieb:
> none a écrit :
>> Hello,
>>
>> IIRC, I once saw an explanation how Python doesn't have
>> "variables" in the sense that, say, C does, and instead has bindings
>> from names to objects. Does anyone have a link?
>>
>> Thanks,
>>
>> Ami
>
> That's somethi
none a écrit :
> Hello,
>
> IIRC, I once saw an explanation how Python doesn't have "variables"
> in the sense that, say, C does, and instead has bindings from names to
> objects. Does anyone have a link?
>
> Thanks,
>
> Ami
That's something I've often heard and I don't get it
Hello,
IIRC, I once saw an explanation how Python doesn't have "variables" in
the sense that, say, C does, and instead has bindings from names to
objects. Does anyone have a link?
Thanks,
Ami
--
http://mail.python.org/mailman/listinfo/python-list
47 matches
Mail list logo