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 reference
Except that
En Tue, 24 Feb 2009 06:44:01 -0200, andrew cooke and...@acooke.org
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
Gabriel Genellina wrote:
En Tue, 24 Feb 2009 06:44:01 -0200, andrew cooke and...@acooke.org
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
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
2 - everything is passed by
2009/2/24 Steven D'Aprano st...@pearwood.info:
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
En Mon, 23 Feb 2009 03:54:16 -0200, Denis Kasak denis.ka...@gmail.com
escribió:
On Mon, Feb 23, 2009 at 5:09 AM, Steven D'Aprano
ste...@remove.this.cybersource.com.au wrote:
On Sun, 22 Feb 2009 13:37:27 -0300, andrew cooke wrote:
as far as i understand things, the best model is:
1 -
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 thinking of
Denis Kasak wrote:
On Mon, Feb 23, 2009 at 5:09 AM, Steven D'Aprano
ste...@remove.this.cybersource.com.au 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, 2009, at 3:03 , Gabriel Genellina wrote:
En Mon, 23 Feb 2009 03:54:16 -0200, Denis Kasak
denis.ka...@gmail.com escribió:
On Mon, Feb 23, 2009 at 5:09 AM, Steven D'Aprano
ste...@remove.this.cybersource.com.au wrote:
On Sun, 22 Feb 2009 13:37:27 -0300, andrew cooke wrote:
as far
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 don't
On Mon, Feb 23, 2009 at 8:41 PM, Christian Heimes li...@cheimes.de 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
Denis Kasak wrote:
On Mon, Feb 23, 2009 at 8:41 PM, Christian Heimes li...@cheimes.de 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
On Mon, Feb 23, 2009 at 9:12 PM, Steve Holden st...@holdenweb.com 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
Denis Kasak wrote:
On Mon, Feb 23, 2009 at 9:12 PM, Steve Holden st...@holdenweb.com 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
En Mon, 23 Feb 2009 17:17:04 -0200, Brian Blais bbl...@bryant.edu
escribió:
On Feb 23, 2009, at 3:03 , Gabriel Genellina wrote:
En Mon, 23 Feb 2009 03:54:16 -0200, Denis Kasak
denis.ka...@gmail.com escribió:
On Mon, Feb 23, 2009 at 5:09 AM, Steven D'Aprano
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 wrong. If it were
On Mon, Feb 23, 2009 at 5:09 AM, Steven D'Aprano
ste...@remove.this.cybersource.com.au 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
On Feb 23, 2:13 am, Torsten Mohr tm...@s.netic.de 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
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 there a general
Torsten Mohr tm...@s.netic.de 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
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
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 a
andrew cooke and...@acooke.org 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
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 assuming
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)
25 matches
Mail list logo