On Tue, Sep 26, 2017 11:00 PM, Steve D'Aprano
wrote:
>
The critical distinction here is whether the names refer to each other:
>
>a <---> b
>
>or whether they merely refer to the same value:
>
>a ---> [ value ] <--- b
>
>
>Python uses the second model. Var parameters in Pascal and references in C
Op 27-09-17 om 09:38 schreef Steven D'Aprano:
No, the model that C++ and Pascal use is not different in this aspect.
> that Pascal var parameters and C++ reference variables operate the same
> way as Python variable assignment, the *kindest* thing I can say is that
> you are ignorant.
The kind
Op 27-09-17 om 10:11 schreef Chris Angelico:
> On Wed, Sep 27, 2017 at 5:38 PM, Steven D'Aprano
> wrote:
>> Twice you have claimed to be able to write such a swap procedure for
>> lists. You can't. If you think you can, it is only because you have
>> misunderstood the problem and are writing somet
On Wed, Sep 27, 2017 at 5:38 PM, Steven D'Aprano
wrote:
> Twice you have claimed to be able to write such a swap procedure for
> lists. You can't. If you think you can, it is only because you have
> misunderstood the problem and are writing something else that does
> something different from what
On Wed, 27 Sep 2017 08:56:03 +0200, Antoon Pardon wrote:
>> But that's not enough for the variable b to be an alias for the
>> variable a.
>
> Yes it is!
Since you seem to be intent on inventing your own meanings for well
established words, for the confusion and misinformation of all, I can
o
Op 27-09-17 om 04:58 schreef Steve D'Aprano:
> A pedantic difference that makes no difference to my argument.
>
> I see that you ignored the later assignment:
>
> b = 2;
>
> which also assigned to a. *That** is the fundamental point: b is certainly an
> alias for a, and assigning to b assigns to a.
Op 27-09-17 om 04:58 schreef Steve D'Aprano:
> On Wed, 27 Sep 2017 02:03 am, Stefan Ram wrote:
>
>> Steve D'Aprano writes:
>>> On Tue, 26 Sep 2017 03:26 am, Antoon Pardon wrote:
at that moment, but it still needed correction. If the assignment is
an alias operator then after the statemen
Steve D'Aprano wrote:
On Wed, 27 Sep 2017 02:03 am, Stefan Ram wrote:
Steve D'Aprano writes:
On Tue, 26 Sep 2017 03:26 am, Antoon Pardon wrote:
at that moment, but it still needed correction. If the assignment is
an alias operator then after the statements
Here's some C++ code that demonstr
On Wed, 27 Sep 2017 02:03 am, Stefan Ram wrote:
> Steve D'Aprano writes:
>>On Tue, 26 Sep 2017 03:26 am, Antoon Pardon wrote:
>>>at that moment, but it still needed correction. If the assignment is
>>>an alias operator then after the statements
>>Here's some C++ code that demonstrates it. Apologi
On Tue, Sep 26, 2017 12:00 PM, Steve D'Aprano
wrote:
>
> a = 1
>> b = a
>> b = 2
>>
>> a is not 2.
>
< snip >
int main () {
> int a;
> int& b = a; // reference variable or alias
>
> a = 1;
> printf("a: %d, alias b: %d\n", a, b);
> b = 2;
> printf("a: %d, alias b: %d\n", a, b);
> r
Rhodri James :
> On 25/09/17 20:40, Marko Rauhamaa wrote:
>> A pointer is something that points to a data object.
>
> In that case you are using "pointer" in such an informal sense that
> making deductions from it is unlikely to be successful.
Propose a name for the concept. Candidates so far: "p
On Wed, Sep 27, 2017 at 5:24 AM, Grant Edwards
wrote:
> On 2017-09-26, alister via Python-list wrote:
>> On Tue, 26 Sep 2017 14:16:47 +, Grant Edwards wrote:
>>
>>> On 2017-09-26, Ned Batchelder wrote:
On 9/25/17 10:20 PM, Steve D'Aprano wrote:
> On Tue, 26 Sep 2017 02:54 am, Ned Ba
On 2017-09-26, alister via Python-list wrote:
> On Tue, 26 Sep 2017 14:16:47 +, Grant Edwards wrote:
>
>> On 2017-09-26, Ned Batchelder wrote:
>>> On 9/25/17 10:20 PM, Steve D'Aprano wrote:
On Tue, 26 Sep 2017 02:54 am, Ned Batchelder wrote:
[...]
>>> We've been asked
On 2017-09-26 18:25, alister via Python-list wrote:
>>> We've been asked nicely by the list mod to stop :)
>>
>> Perhaps we could agree on a subject line tag to be used in all
>> threas arguing about what to call the Python argument passing
>> scheme? That way the other 99% of us could pre-empt
On Wed, Sep 27, 2017 at 4:25 AM, alister via Python-list
wrote:
> On Tue, 26 Sep 2017 14:16:47 +, Grant Edwards wrote:
>
>> On 2017-09-26, Ned Batchelder wrote:
>>> On 9/25/17 10:20 PM, Steve D'Aprano wrote:
On Tue, 26 Sep 2017 02:54 am, Ned Batchelder wrote:
[...]
>>
On Tue, 26 Sep 2017 14:16:47 +, Grant Edwards wrote:
> On 2017-09-26, Ned Batchelder wrote:
>> On 9/25/17 10:20 PM, Steve D'Aprano wrote:
>>> On Tue, 26 Sep 2017 02:54 am, Ned Batchelder wrote:
>>> [...]
>>>
>>>
>>>
>> We've been asked nicely by the list mod to stop :)
>
> Perhaps we could a
On 26-09-17 14:28, Steve D'Aprano wrote:
> On Tue, 26 Sep 2017 03:26 am, Antoon Pardon wrote:
>
>> Sorry, what he wrote contradicts that. Maybe he was just really confused
>> at that moment, but it still needed correction. If the assignment is
>> an alias operator then after the statements
>>
>> a
On 26/09/2017 15:16, Grant Edwards wrote:
On 2017-09-26, Ned Batchelder wrote:
On 9/25/17 10:20 PM, Steve D'Aprano wrote:
On Tue, 26 Sep 2017 02:54 am, Ned Batchelder wrote:
[...]
We've been asked nicely by the list mod to stop :)
Perhaps we could agree on a subject line tag to be used i
On 2017-09-26, Ned Batchelder wrote:
> On 9/25/17 10:20 PM, Steve D'Aprano wrote:
>> On Tue, 26 Sep 2017 02:54 am, Ned Batchelder wrote:
>> [...]
>>
>>
>
> We've been asked nicely by the list mod to stop :)
Perhaps we could agree on a subject line tag to be used in all threas
arguing about what t
On Tue, 26 Sep 2017 03:26 am, Antoon Pardon wrote:
>>> I'm not sure that Steve knows how it works. When he denies that the
>>> assignment is an alias operation in Python that casts an important doubt.
>>
>> I can assure you that Steve knows how it works. Again, the disagreement is
>> almost certa
On 25/09/17 21:00, Tim Golden wrote:
(Slight sigh). Can I step in as a list owner and ask the people who are
so very fond of debating this topic again and again: please let it drop.
But, but... someone on the internet is wrong!
https://www.facebook.com/playingrapunzel/videos/10153716804864491/
On 25/09/17 20:40, Marko Rauhamaa wrote:
Rhodri James :
On 25/09/17 15:26, Marko Rauhamaa wrote:
That's not what I said. I said all expressions *evaluate to* pointers.
This may well be true in particular implementations, but it is an
implementation detail so Chris' point still stands. Anothe
Chris Angelico :
> I've explained Python's (or JavaScript's, since they're the same)
> object model to a number of novice programmers without any
> difficulties, without talking about pointers or invisible values or
> any of that junk. There are just two things to explain: the concept of
> names r
Op 25-09-17 om 21:44 schreef Ned Batchelder:
>
> Wikipedia has the right definition of call by reference
> (https://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_reference):
>
> /Call by reference/ (also referred to as /pass by reference/) is an
> evaluation strategy where a function rece
Antoon Pardon wrote:
It also says: This typically means that the function can modify the variable
used as argument, something Python can do that.
No, it can't. It can modify the *object* bound to the variable,
but *not* the variable itself.
If you think it can, then you're misunderstanding wha
On Tue, Sep 26, 2017 at 4:25 PM, Gregory Ewing
wrote:
> Neil Cerutti wrote:
>>
>> The quest to find a succinct way to categorize Python's argument
>> passing for non-Python programmers strikes me as a sincere effort
>> to to simplify something that just isn't simple.
>
>
> I don't see how it's use
Neil Cerutti wrote:
The quest to find a succinct way to categorize Python's argument
passing for non-Python programmers strikes me as a sincere effort
to to simplify something that just isn't simple.
I don't see how it's useful to do that in the first place.
Under what circumstances would you f
On 9/25/17 10:20 PM, Steve D'Aprano wrote:
On Tue, 26 Sep 2017 02:54 am, Ned Batchelder wrote:
[...]
We've been asked nicely by the list mod to stop :)
--Ned.
--
https://mail.python.org/mailman/listinfo/python-list
Tim Golden wrote:
On 25/09/2017 20:40, Marko Rauhamaa wrote:
Rhodri James :
On 25/09/17 15:26, Marko Rauhamaa wrote:
That's not what I said. I said all expressions *evaluate to* pointers.
This may well be true in particular implementations, but it is an
implementation detail so Chris' point
Chris Angelico wrote:
On Tue, Sep 26, 2017 at 5:35 AM, Marko Rauhamaa wrote:
Chris Angelico :
On Tue, Sep 26, 2017 at 12:26 AM, Marko Rauhamaa wrote:
Sorry, that was my bad in the terminology. But where do you get that
all Python expressions evaluate to pointers?
What do they evaluate to if
On Tue, 26 Sep 2017 02:54 am, Ned Batchelder wrote:
[...]
Heh, its hard to avoid getting sucked into the sinkhole of definitional debates,
isn't it? :-)
[...]
> But in this line:
>
> x = 2 + 2
>
> You can say,
>
> the value of x is 4
If we're talking about the highest level abstraction leve
Steve D'Aprano wrote:
Or perhaps I should say:
I disintegrate it really snooze to pyramid running when the ribbons they
apply to sandwiches are not the same as the sleep I use.
You could say that, and nobody would care much.
If you insisted that your personal interpretation of those
On 25-09-17 18:29, Steve D'Aprano wrote:
>
> Regardless of whether I'm using Python, Swift, Java, C, Pascal or Scheme, if I
> write something like:
>
> x = Parrot(name="Polly")
>
> (using Python syntax for simplicity) and somebody tries to tell me that the
> value of x is anything but a Parrot
On 25-09-17 21:44, Ned Batchelder wrote:
> On 9/25/17 5:32 AM, Antoon Pardon wrote:
>> Can you explain, what you mean by "Pass-By-Reference" as far a I understand,
>> pass by reference means that the parameter of the function becomes an alias
>> of the argument, so that if the entity is mutated thr
On 2017-09-25, Steve D'Aprano wrote:
> So I believe that either "call by binding" or "call by
> assignment" could both equally apply to any and all languages
> with function parameters, regardless of implementation or the
> language's defined semantics.
I disagree on C++ where there's a keen diff
Chris Angelico :
> On Tue, Sep 26, 2017 at 5:36 AM, Marko Rauhamaa wrote:
>> Chris Angelico :
>>> You need *some* support for your assertion that there are pointers,
>>
>> What would convince you?
>
> Evidence, or a statement from the documentation.
I mean, what piece of Python code could decide
On Tue, Sep 26, 2017 at 5:51 AM, Stefan Ram wrote:
> Ned Batchelder writes:
>>Wikipedia has the right definition of call by reference
>
> Assertions can be right or wrong.
>
> Definitions cannot be right or wrong.
You have made two assertions. One of them is right. The other is wrong. :-)
C
On 25/09/2017 20:40, Marko Rauhamaa wrote:
Rhodri James :
On 25/09/17 15:26, Marko Rauhamaa wrote:
That's not what I said. I said all expressions *evaluate to* pointers.
This may well be true in particular implementations, but it is an
implementation detail so Chris' point still stands. Anot
On Tue, Sep 26, 2017 at 5:36 AM, Marko Rauhamaa wrote:
> Chris Angelico :
>> You need *some* support for your assertion that there are pointers,
>
> What would convince you?
Evidence, or a statement from the documentation.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
Rhodri James :
> On 25/09/17 15:26, Marko Rauhamaa wrote:
>> That's not what I said. I said all expressions *evaluate to* pointers.
>
> This may well be true in particular implementations, but it is an
> implementation detail so Chris' point still stands. Another
> implementation could evaluate ex
On Tue, Sep 26, 2017 at 5:35 AM, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> On Tue, Sep 26, 2017 at 12:26 AM, Marko Rauhamaa wrote:
>> Sorry, that was my bad in the terminology. But where do you get that
>> all Python expressions evaluate to pointers?
>
> What do they evaluate to if not pointe
On 9/25/17 5:32 AM, Antoon Pardon wrote:
Can you explain, what you mean by "Pass-By-Reference" as far a I understand,
pass by reference means that the parameter of the function becomes an alias
of the argument, so that if the entity is mutated through one name that
mutation is visible through the
Chris Angelico :
> You need *some* support for your assertion that there are pointers,
What would convince you?
Marko
--
https://mail.python.org/mailman/listinfo/python-list
Chris Angelico :
> On Tue, Sep 26, 2017 at 12:26 AM, Marko Rauhamaa wrote:
> Sorry, that was my bad in the terminology. But where do you get that
> all Python expressions evaluate to pointers?
What do they evaluate to if not pointers? Anton's "identities" would
work, too. "Address" would do, as
On Tue, Sep 26, 2017 at 4:30 AM, Antoon Pardon
wrote:
> On 25-09-17 20:01, Chris Angelico wrote:
>> On Tue, Sep 26, 2017 at 3:54 AM, Antoon Pardon
>> wrote:
>>> On 25-09-17 19:31, Chris Angelico wrote:
If by "identity" you mean the integer values returned by id(), then
nope, you're stil
On 25-09-17 20:01, Chris Angelico wrote:
> On Tue, Sep 26, 2017 at 3:54 AM, Antoon Pardon
> wrote:
>> On 25-09-17 19:31, Chris Angelico wrote:
>>> If by "identity" you mean the integer values returned by id(), then
>>> nope, you're still wrong - there is no mapping from identities to
>>> values. T
On 25/09/17 15:26, Marko Rauhamaa wrote:
Chris Angelico :
On Mon, Sep 25, 2017 at 7:41 PM, Marko Rauhamaa wrote:
In Python, all expressions evaluate pointers.
And that's an assertion that isn't backed by anything in the Python
specification. Where do you get that all Python expressions are
On Tue, Sep 26, 2017 at 3:54 AM, Antoon Pardon
wrote:
> On 25-09-17 19:31, Chris Angelico wrote:
>> If by "identity" you mean the integer values returned by id(), then
>> nope, you're still wrong - there is no mapping from identities to
>> values. There is a mapping from name to object/value, and
I would claim that these two paragraphs do not agree.
What is stored in the variable in Pascal?
In declared variables and value parameters, the value itself.
Let's just temporarily stipulate that for reference parameters
and pointer variables actually store a pointer to the object.
Where is it r
On 25-09-17 19:31, Chris Angelico wrote:
> On Tue, Sep 26, 2017 at 3:04 AM, Antoon Pardon
> wrote:
>> On 25-09-17 16:29, Marko Rauhamaa wrote:
>>> Antoon Pardon :
>>>
Op 25-09-17 om 15:16 schreef Marko Rauhamaa:
> No, I'm not. I'm talking about pointers in the abstract sense, both in
On Tue, Sep 26, 2017 at 12:26 AM, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> On Mon, Sep 25, 2017 at 7:41 PM, Marko Rauhamaa wrote:
>>> In Python, all expressions evaluate pointers.
>>
>> And that's an assertion that isn't backed by anything in the Python
>> specification. Where do you get tha
On Tue, Sep 26, 2017 at 2:52 AM, Tim Chase
wrote:
> On 2017-09-26 02:29, Steve D'Aprano wrote:
>> x = Parrot(name="Polly")
>>
>> (using Python syntax for simplicity) and somebody tries to tell me
>> that the value of x is anything but a Parrot instance named "Polly",
>
> So this is a Polly-morphic
On Tue, Sep 26, 2017 at 3:04 AM, Antoon Pardon
wrote:
> On 25-09-17 16:29, Marko Rauhamaa wrote:
>> Antoon Pardon :
>>
>>> Op 25-09-17 om 15:16 schreef Marko Rauhamaa:
No, I'm not. I'm talking about pointers in the abstract sense, both in
case of Python and Pascal. Neither language gives
On 25-09-17 15:37, Ned Batchelder wrote:
> On 9/25/17 9:15 AM, Antoon Pardon wrote:
>> Op 25-09-17 om 14:53 schreef Ned Batchelder:
>>> On 9/25/17 8:24 AM, Steve D'Aprano wrote:
On Mon, 25 Sep 2017 08:05 pm, Antoon Pardon wrote:
> Pass by reference doesn't imply being able to
> wr
On 25-09-17 16:29, Marko Rauhamaa wrote:
> Antoon Pardon :
>
>> Op 25-09-17 om 15:16 schreef Marko Rauhamaa:
>>> No, I'm not. I'm talking about pointers in the abstract sense, both in
>>> case of Python and Pascal. Neither language gives any hint as to the
>>> physical nature of the pointer.
>>
>>
On 2017-09-26 02:29, Steve D'Aprano wrote:
> x = Parrot(name="Polly")
>
> (using Python syntax for simplicity) and somebody tries to tell me
> that the value of x is anything but a Parrot instance named "Polly",
So this is a Polly-morphic constructor?
-tkc
--
https://mail.python.org/mailman/l
On Sun, 24 Sep 2017 09:13 am, Bill wrote:
[context snipped for brevity]
> I agree (I was a bit hasty in my choice of words); but if they didn't
> "have" these references, it would be difficult, though not impossible,
> to refer to them. Also keep in mind that the garbage collector keeps
> track,
On 9/25/17 12:29 PM, Steve D'Aprano wrote:
Regardless of whether I'm using Python, Swift, Java, C, Pascal or Scheme, if I
write something like:
x = Parrot(name="Polly")
(using Python syntax for simplicity) and somebody tries to tell me that the
value of x is anything but a Parrot instance named
On Mon, 25 Sep 2017 10:53 pm, Ned Batchelder wrote:
> Would we be able to end these interminable debates if we just agree that
> we all know how it works,
If only that were true. Not everyone understands Python semantics (or for that
matter, Java/Swift/language of your choice) and I still come a
On 9/25/17 9:15 AM, Antoon Pardon wrote:
Op 25-09-17 om 14:53 schreef Ned Batchelder:
On 9/25/17 8:24 AM, Steve D'Aprano wrote:
On Mon, 25 Sep 2017 08:05 pm, Antoon Pardon wrote:
Pass by reference doesn't imply being able to
write a swap function.
Really. Do you have a counter-example?
A
Chris Angelico :
> On Mon, Sep 25, 2017 at 7:41 PM, Marko Rauhamaa wrote:
>> In Python, all expressions evaluate pointers.
>
> And that's an assertion that isn't backed by anything in the Python
> specification. Where do you get that all Python expressions are
> pointers?
That's not what I said.
Antoon Pardon :
> Op 25-09-17 om 15:16 schreef Marko Rauhamaa:
>> No, I'm not. I'm talking about pointers in the abstract sense, both in
>> case of Python and Pascal. Neither language gives any hint as to the
>> physical nature of the pointer.
>
> Yes you are. Python doesn't have pointers at the l
On Mon, Sep 25, 2017 at 7:41 PM, Marko Rauhamaa wrote:
> Antoon Pardon :
>
>> the semantics of an assignment depends on the language
>
> I've only seen one kind of assignment in the general-purpose programming
> languages I know, maybe with the exception of Prolog and Rust.
>
> So the assignment i
Op 25-09-17 om 15:16 schreef Marko Rauhamaa:
> Antoon Pardon :
>
>> Op 25-09-17 om 14:16 schreef Marko Rauhamaa:
>>> Python only operates with pointers. You can operate with pointers in
>>> Pascal as well.
>> You are talking about implementation details.
> No, I'm not. I'm talking about pointers in
Antoon Pardon :
> Op 25-09-17 om 14:16 schreef Marko Rauhamaa:
>> Python only operates with pointers. You can operate with pointers in
>> Pascal as well.
>
> You are talking about implementation details.
No, I'm not. I'm talking about pointers in the abstract sense, both in
case of Python and Pas
Op 25-09-17 om 14:53 schreef Ned Batchelder:
> On 9/25/17 8:24 AM, Steve D'Aprano wrote:
>> On Mon, 25 Sep 2017 08:05 pm, Antoon Pardon wrote:
>>
>>> Pass by reference doesn't imply being able to
>>> write a swap function.
>> Really. Do you have a counter-example?
>>
>>
>>> A swap function as possi
Op 25-09-17 om 14:16 schreef Marko Rauhamaa:
> Antoon Pardon :
>
>> Op 25-09-17 om 13:32 schreef Marko Rauhamaa:
>>> In Python, assignment "mutates the target" as well. It's only that in
>>> Python, the target is always a pointer.
>> Fine if you want to word it like that, the assignments in Pascal
On 9/25/17 8:24 AM, Steve D'Aprano wrote:
On Mon, 25 Sep 2017 08:05 pm, Antoon Pardon wrote:
Pass by reference doesn't imply being able to
write a swap function.
Really. Do you have a counter-example?
A swap function as possible in pascal requires two conditions.
1) Pass by reference
2) Co
Op 25-09-17 om 14:24 schreef Steve D'Aprano:
> On Mon, 25 Sep 2017 08:05 pm, Antoon Pardon wrote:
>
>> Pass by reference doesn't imply being able to
>> write a swap function.
> Really. Do you have a counter-example?
Python, smalltalk, scheme.
>
>
>> A swap function as possible in pascal requires
On Mon, 25 Sep 2017 08:05 pm, Antoon Pardon wrote:
> Pass by reference doesn't imply being able to
> write a swap function.
Really. Do you have a counter-example?
> A swap function as possible in pascal requires two conditions.
>
> 1) Pass by reference
> 2) Copy-over assignment.
I don't know
Antoon Pardon :
> Op 25-09-17 om 13:32 schreef Marko Rauhamaa:
>> In Python, assignment "mutates the target" as well. It's only that in
>> Python, the target is always a pointer.
>
> Fine if you want to word it like that, the assignments in Pascal and
> Python are still sufficiently different.
>
>
Op 25-09-17 om 13:32 schreef Marko Rauhamaa:
> Antoon Pardon :
>
>> Op 25-09-17 om 11:41 schreef Marko Rauhamaa:
>>> Antoon Pardon :
>>>
the semantics of an assignment depends on the language
>>> I've only seen one kind of assignment in the general-purpose
>>> programming languages I know, may
Antoon Pardon :
> Op 25-09-17 om 11:41 schreef Marko Rauhamaa:
>> Antoon Pardon :
>>
>>> the semantics of an assignment depends on the language
>> I've only seen one kind of assignment in the general-purpose
>> programming languages I know, maybe with the exception of Prolog and
>> Rust.
>
> I dis
Op 25-09-17 om 11:41 schreef Marko Rauhamaa:
> Antoon Pardon :
>
>> the semantics of an assignment depends on the language
> I've only seen one kind of assignment in the general-purpose programming
> languages I know, maybe with the exception of Prolog and Rust.
I disagree. In languages like Pasca
Op 22-09-17 om 15:30 schreef Steve D'Aprano:
> On Fri, 22 Sep 2017 10:27 pm, Marko Rauhamaa wrote:
>
>> r...@zedat.fu-berlin.de (Stefan Ram):
>>
>>> Marko Rauhamaa writes:
swap(slot_ref(locals(), "x"), slot_ref(locals(), "y"))
>>> You need to be able to write the call as
>>>
>>> swap( x, y
Antoon Pardon :
> the semantics of an assignment depends on the language
I've only seen one kind of assignment in the general-purpose programming
languages I know, maybe with the exception of Prolog and Rust.
So the assignment is the same everywhere, only the evaluation model
varies. In classic
Op 24-09-17 om 04:13 schreef Steve D'Aprano:
>> and consider
>> that something else has to happen as an alternative, and (2) understand
>> that in Python, objects don't have names, they have references (which
>> have names). The rest could be "implementation dependent" (no?)
> No.
>
> There are m
Op 25-09-17 om 00:39 schreef Gregory Ewing:
> Dennis Lee Bieber wrote:
>> "Binding" itself tends to be Python specific terminology -- in
>> that it
>> is the parameter /name/ that gets bound/attached to the argument
>> /object/.
>> It is the same method as used in any Python "assignment" statem
Steve D'Aprano wrote:
I think that suffers from the same problem as "call by binding" -- assignment is
too general a word.
If you're learning a new language, you're almost certainly
going to learn how assignment works in that language before
you get as far as worrying about parameter passing. I
Dennis Lee Bieber wrote:
Though "assignment" differs so much between languages
That's the point of the term -- it's the same as whatever
assignment does in the language concerned.
This is true of *every* language I know of that uses the
term "call by value" in its official documentatio
On 09/24/2017 09:56 AM, Dennis Lee Bieber wrote:
> "Binding" itself tends to be Python specific terminology
Not so. How it's used in Python terminology is fairly closely aligned
with how the word was used in my programming language theory class at
uni, where it was defined in mathematical t
On Mon, 25 Sep 2017 08:39 am, Gregory Ewing wrote:
> Dennis Lee Bieber wrote:
>> "Binding" itself tends to be Python specific terminology -- in that it
"Binding" is certainly not Python-specific:
https://en.wikipedia.org/wiki/Name_binding
and here's an example of the term in use:
https://www.g
On Sun, 24 Sep 2017 12:37 pm, Bill wrote:
>> For example, if I made "Pass-By-Reference Python" where all argument passing
>> was done by reference, my language would differ from real Python:
>>
>>
>> function(x, y) # allowed
>> function(namespace.x, module.y) # allowed
>> function(x + 1, 2) # F
On Mon, 25 Sep 2017 01:56 am, bartc wrote:
>> The point I am making is that we could describe just about any and all
>> languages with functions "call by binding", whether they are call by value
>> like C, call by reference like Fortran, call by need like Haskell, or call by
>> sharing like Python
Dennis Lee Bieber wrote:
"Binding" itself tends to be Python specific terminology -- in that it
is the parameter /name/ that gets bound/attached to the argument /object/.
It is the same method as used in any Python "assignment" statement,
Which is why I think "call by assignment" would
On 24/09/2017 15:49, Steve D'Aprano wrote:
On Mon, 25 Sep 2017 12:35 am, Stefan Ram wrote:
WRT to assertions about Python, I try to base them on the
"The Python Language Reference, Release 3.6.0" (PRL).
So, WRT to parameter passing, I would use this part of the PRL:
»The follo
On Mon, 25 Sep 2017 12:35 am, Stefan Ram wrote:
> WRT to assertions about Python, I try to base them on the
> "The Python Language Reference, Release 3.6.0" (PRL).
>
> So, WRT to parameter passing, I would use this part of the PRL:
>
> »The following constructs bind names: formal par
Steve D'Aprano wrote:
On Sun, 24 Sep 2017 08:18 am, Bill wrote:
All one has to do, I think, is consider (1) that passing objects by
"making copies" of them, would be prohibitively expensive
Swift passes certain values (but not others!) by value and makes a copy. That
includes many potentially
On Sun, 24 Sep 2017 08:18 am, Bill wrote:
> All one has to do, I think, is consider (1) that passing objects by
> "making copies" of them, would be prohibitively expensive
Swift passes certain values (but not others!) by value and makes a copy. That
includes many potentially large data types in
On Sun, 24 Sep 2017 07:03 am, ROGER GRAYDON CHRISTMAN wrote:
> I usually do not encourage people to optimize correctness out of their code.
+1 quote of the week :-)
--
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.
--
https://mail
Chris Angelico wrote:
On Sun, Sep 24, 2017 at 8:18 AM, Bill wrote:
Stephan Houben wrote:
Op 2017-09-23, Rick Johnson schreef :
These pissing contests over how values are passed in Python
are totally irrelevant. What does it matter? Nothing will be
gained or lost by arguing over which is true,
On Sun, Sep 24, 2017 at 8:18 AM, Bill wrote:
> Stephan Houben wrote:
>>
>> Op 2017-09-23, Rick Johnson schreef :
>>>
>>> These pissing contests over how values are passed in Python
>>> are totally irrelevant. What does it matter? Nothing will be
>>> gained or lost by arguing over which is true, or
Stephan Houben wrote:
Op 2017-09-23, Rick Johnson schreef :
These pissing contests over how values are passed in Python
are totally irrelevant. What does it matter? Nothing will be
gained or lost by arguing over which is true, or not. Unless
the distinction is preventing you from doing something
On Fri, Sep 22, 2017 12:03 PM, Dennis Lee Bier wrote:>
On Fri, 22 Sep 2017 23:30:34 +1000, Steve D'Aprano
>
declaimed the following:
>
>The exercise is to demonstrate pass by reference semantics. That requires
>
>demonstrating the same semantics as the Pascal swap procedure:
>
>
>
>procedure swa
Op 2017-09-23, Rick Johnson schreef :
> These pissing contests over how values are passed in Python
> are totally irrelevant. What does it matter? Nothing will be
> gained or lost by arguing over which is true, or not. Unless
> the distinction is preventing you from doing something that
> you'd lik
Mark Lawrence wrote:
> [...]
> I have no interest it what the C++ does, looks like or
> anything else. All I'm bothered about is that two highly
> respected members of the Python community have stated quite
> clearly that Python is call by object. Many other people
> have stated the same in this
On 23/09/2017 04:06, Bill wrote:
Mark Lawrence wrote:
On 22/09/2017 08:01, Bill wrote:
Steve D'Aprano wrote:
On Fri, 22 Sep 2017 02:57 pm, Bill wrote:
I find Python to be more more
like Java, with regard to "passing objects by reference".
Which is not a surprise, since both Python and Java u
Bill wrote:
Mark Lawrence wrote:
On 22/09/2017 08:01, Bill wrote:
Steve D'Aprano wrote:
On Fri, 22 Sep 2017 02:57 pm, Bill wrote:
I find Python to be more more
like Java, with regard to "passing objects by reference".
Which is not a surprise, since both Python and Java use the same
value pa
Mark Lawrence wrote:
On 22/09/2017 08:01, Bill wrote:
Steve D'Aprano wrote:
On Fri, 22 Sep 2017 02:57 pm, Bill wrote:
I find Python to be more more
like Java, with regard to "passing objects by reference".
Which is not a surprise, since both Python and Java use the same
value passing
style:
Chris Angelico :
> On Fri, Sep 22, 2017 at 10:26 PM, Marko Rauhamaa wrote:
>> Chris Angelico :
>>> (Side point: Your slot_ref function is rather bizarre. It's a closure
>>> AND a class, just in case one of them isn't sufficient.
>>
>> I don't see anything bizarre in it at all.
> Sure you *can* d
1 - 100 of 201 matches
Mail list logo