2009/2/24 Steven D'Aprano :
> If you look at this Wikipedia page:
>
> http://en.wikipedia.org/wiki/Evaluation_strategy
>
> you should be able to count no fewer than thirteen different terms for
> different evaluation strategies, and "call-by-value" itself is described as
> a family of strategies.
andrew cooke wrote:
> Steven D'Aprano wrote:
>> On Mon, 23 Feb 2009 08:14:34 -0300, andrew cooke wrote:
>>
>>> Steven D'Aprano wrote:
On Sun, 22 Feb 2009 13:37:27 -0300, andrew cooke wrote:
> as far as i understand things, the best model is:
>
> 1 - everything is an object
>>
Gabriel Genellina wrote:
> En Tue, 24 Feb 2009 06:44:01 -0200, andrew cooke
> escribió:
>
>> Steven D'Aprano wrote:
>>> On Mon, 23 Feb 2009 08:14:34 -0300, andrew cooke wrote:
>>>
Steven D'Aprano wrote:
> On Sun, 22 Feb 2009 13:37:27 -0300, andrew cooke wrote:
>
>> as far as i und
En Tue, 24 Feb 2009 06:44:01 -0200, andrew cooke
escribió:
Steven D'Aprano wrote:
On Mon, 23 Feb 2009 08:14:34 -0300, andrew cooke wrote:
Steven D'Aprano wrote:
On Sun, 22 Feb 2009 13:37:27 -0300, andrew cooke wrote:
as far as i understand things, the best model is:
1 - everything is a
Steven D'Aprano wrote:
> On Mon, 23 Feb 2009 08:14:34 -0300, andrew cooke wrote:
>
>> Steven D'Aprano wrote:
>>> On Sun, 22 Feb 2009 13:37:27 -0300, andrew cooke wrote:
>>>
as far as i understand things, the best model is:
1 - everything is an object
2 - everything is passed by
On Mon, 23 Feb 2009 08:14:34 -0300, andrew cooke wrote:
> Steven D'Aprano wrote:
>> On Sun, 22 Feb 2009 13:37:27 -0300, andrew cooke wrote:
>>
>>> as far as i understand things, the best model is:
>>>
>>> 1 - everything is an object
>>> 2 - everything is passed by reference
>>
>> Except that is wr
En Mon, 23 Feb 2009 17:17:04 -0200, Brian Blais
escribió:
On Feb 23, 2009, at 3:03 , Gabriel Genellina wrote:
En Mon, 23 Feb 2009 03:54:16 -0200, Denis Kasak
escribió:
On Mon, Feb 23, 2009 at 5:09 AM, Steven D'Aprano
wrote:
On Sun, 22 Feb 2009 13:37:27 -0300, andrew cooke wrote:
as far a
Denis Kasak wrote:
> On Mon, Feb 23, 2009 at 9:12 PM, Steve Holden wrote:
>> Denis Kasak wrote:
>>> I assure you I am not confused about Python's object model / calling
>>> system. I was arguing, from a purely theoretical standpoint, that the
>>> same system Python uses could be described in terms
On Mon, Feb 23, 2009 at 9:12 PM, Steve Holden wrote:
> Denis Kasak wrote:
>> I assure you I am not confused about Python's object model / calling
>> system. I was arguing, from a purely theoretical standpoint, that the
>> same system Python uses could be described in terms of
>> call-by-reference
Denis Kasak wrote:
> On Mon, Feb 23, 2009 at 8:41 PM, Christian Heimes wrote:
>> Denis Kasak wrote
>>> You could, however, argue that the swap function doesn't work as
>>> expected (e.g. from a Pascal or a C++ POV) simply because the
>>> underlying objects aren't mutable. The objects *do* get pass
On Mon, Feb 23, 2009 at 8:41 PM, Christian Heimes wrote:
> Denis Kasak wrote
>> You could, however, argue that the swap function doesn't work as
>> expected (e.g. from a Pascal or a C++ POV) simply because the
>> underlying objects aren't mutable. The objects *do* get passed by
>> reference;
>
> W
Denis Kasak wrote
> You could, however, argue that the swap function doesn't work as
> expected (e.g. from a Pascal or a C++ POV) simply because the
> underlying objects aren't mutable. The objects *do* get passed by
> reference;
We are getting down the same road every couple of months. Please do
On Feb 23, 2009, at 3:03 , Gabriel Genellina wrote:
En Mon, 23 Feb 2009 03:54:16 -0200, Denis Kasak
escribió:
On Mon, Feb 23, 2009 at 5:09 AM, Steven D'Aprano
wrote:
On Sun, 22 Feb 2009 13:37:27 -0300, andrew cooke wrote:
as far as i understand things, the best model is:
1 - everything
Denis Kasak wrote:
> On Mon, Feb 23, 2009 at 5:09 AM, Steven D'Aprano
> wrote:
>> On Sun, 22 Feb 2009 13:37:27 -0300, andrew cooke wrote:
>>
>>> as far as i understand things, the best model is:
>>>
>>> 1 - everything is an object
>>> 2 - everything is passed by reference
>> Except that is wrong.
Steven D'Aprano wrote:
> On Sun, 22 Feb 2009 13:37:27 -0300, andrew cooke wrote:
>
>> as far as i understand things, the best model is:
>>
>> 1 - everything is an object
>> 2 - everything is passed by reference
>
> Except that is wrong. If it were true, you could do this:
[pointer swapping]
i was
En Mon, 23 Feb 2009 03:54:16 -0200, Denis Kasak
escribió:
On Mon, Feb 23, 2009 at 5:09 AM, Steven D'Aprano
wrote:
On Sun, 22 Feb 2009 13:37:27 -0300, andrew cooke wrote:
as far as i understand things, the best model is:
1 - everything is an object
2 - everything is passed by reference
On Feb 23, 2:13 am, Torsten Mohr wrote:
> Hi,
>
> how is the rule in Python, if i pass objects to a function, when is this
> done by reference and when is it by value?
>
> def f1(a):
> a = 7
>
> b = 3
> f1(b)
> print b
> => 3
>
> Integers are obviously passed by value, lists and dicts by refer
On Mon, Feb 23, 2009 at 5:09 AM, Steven D'Aprano
wrote:
> On Sun, 22 Feb 2009 13:37:27 -0300, andrew cooke wrote:
>
>> as far as i understand things, the best model is:
>>
>> 1 - everything is an object
>> 2 - everything is passed by reference
>
> Except that is wrong. If it were true, you could d
On Sun, 22 Feb 2009 13:37:27 -0300, andrew cooke wrote:
> as far as i understand things, the best model is:
>
> 1 - everything is an object
> 2 - everything is passed by reference
Except that is wrong. If it were true, you could do this:
def swap(x, y):
y, x = x, y
a = 1
b = 2
swap(a, b)
On Sun, 22 Feb 2009 16:13:02 +0100, Torsten Mohr wrote:
> Hi,
>
> how is the rule in Python, if i pass objects to a function, when is this
> done by reference and when is it by value?
Never, and never.
> Integers are obviously passed by value, lists and dicts by reference.
Your error is assum
"andrew cooke" wrote in message
news:mailman.464.1235320654.11746.python-l...@python.org...
> as far as i understand things, the best model is:
>
> 1 - everything is an object
> 2 - everything is passed by reference
> 3 - some objects are immutable
> 4 - some (immutable?) objects are cached/reus
as far as i understand things, the best model is:
1 - everything is an object
2 - everything is passed by reference
3 - some objects are immutable
4 - some (immutable?) objects are cached/reused by the system
andrew
Torsten Mohr wrote:
> Hi,
>
> how is the rule in Python, if i pass objects to
Torsten Mohr wrote:
Hi,
how is the rule in Python, if i pass objects to a function, when is this
done by reference and when is it by value?
def f1(a):
a = 7
b = 3
f1(b)
print b
=> 3
Integers are obviously passed by value, lists and dicts by reference.
Is there a general rule? Some commo
Torsten Mohr wrote:
> how is the rule in Python, if i pass objects to a function, when is this
> done by reference and when is it by value?
>
> def f1(a):
> a = 7
>
> b = 3
> f1(b)
> print b
>=> 3
>
> Integers are obviously passed by value, lists and dicts by reference.
>
> Is there a gen
Torsten Mohr schrieb:
> Hi,
>
> how is the rule in Python, if i pass objects to a function, when is this
> done by reference and when is it by value?
>
> def f1(a):
> a = 7
>
> b = 3
> f1(b)
> print b
> => 3
>
> Integers are obviously passed by value, lists and dicts by reference.
>
> Is t
Hi,
how is the rule in Python, if i pass objects to a function, when is this
done by reference and when is it by value?
def f1(a):
a = 7
b = 3
f1(b)
print b
=> 3
Integers are obviously passed by value, lists and dicts by reference.
Is there a general rule? Some common formulation?
Thank
26 matches
Mail list logo