Re: why cannot assign to function call
- From: Aaron Brady <castironpi@xxxxxxxxx>
- Date: Thu, 8 Jan 2009 03:11:05 -0800 (PST)
On Jan 8, 1:45 am, Steven D'Aprano
<ste...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
On Wed, 07 Jan 2009 10:17:55 +0000, Mark Wooding wrote:snip
The `they're just objects' model is very simple, but gets tied up in
knots explaining things. The `it's all references' model is only a
little more complicated, but explains everything.
But it *over* explains, because it implies things that "everybody knows"
about references in other languages that aren't true for Python.
Of course it's not literally true that "everybody knows" that you can use
references to implement a swap(x, y) procedure. But people coming from a
C or Pascal background tend to assume that everything is like C/Pascal,
and there are a lot of them. If C was a rare, unfamiliar language, my
opposition to using the term "reference" would be a lot milder. Maybe in
another five years?
No, indeed. Python is a language for talking about paperweights. And
it's because of the paperweights that the duck-typing works: all the
paperweights are the same shape and size, so they're physically
interchangeable.
Okay, the abstraction has leaked again... are the paperweights references
to the objects, or the names we've bound objects to? I'm confused...
How do we deal with anonymous objects in your model?
--
Steven
Mark, hi, Steven, pleasure as always.
Neither side is perfect or wild; (Do admit it); How do we decide what
is best for newcomers to Python, depending on background?
.
- Follow-Ups:
- Re: why cannot assign to function call
- From: Mark Wooding
- Re: why cannot assign to function call
- From: Steve Holden
- Re: why cannot assign to function call
- References:
- Re: why cannot assign to function call
- From: Marc 'BlackJack' Rintsch
- Re: why cannot assign to function call
- From: Grant Edwards
- Re: why cannot assign to function call
- From: Derek Martin
- Re: why cannot assign to function call
- From: Grant Edwards
- Re: why cannot assign to function call
- From: Derek Martin
- Re: why cannot assign to function call
- From: Steven D'Aprano
- Re: why cannot assign to function call
- From: Mark Wooding
- Re: why cannot assign to function call
- From: Aaron Brady
- Re: why cannot assign to function call
- From: Steven D'Aprano
- Re: why cannot assign to function call
- From: Mark Wooding
- Re: why cannot assign to function call
- From: Steven D'Aprano
- Re: why cannot assign to function call
- From: Mark Wooding
- Re: why cannot assign to function call
- From: Steven D'Aprano
- Re: why cannot assign to function call
- Prev by Date: Re: Oh! The people of all over the world!
- Next by Date: Re: Generator metadata/attributes
- Previous by thread: Re: why cannot assign to function call
- Next by thread: Re: why cannot assign to function call
- Index(es):
Relevant Pages
|