![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.python archiveRe: working with pointers
From: Steven Bethard <steven.bethard@gmail.com>
Date: Tue May 31 2005 - 21:13:00 CEST
Michael wrote:
It *always* means a reference. It *never* makes a copy.
Although the terminology isn't quite right, you can think of all
Your example with integers:
py> a = 2
A simlar example with lists:
py> a = [5, 7]
Of course, if you modify an object while two names are bound to it ("two
py> a = [5, 7]
Note that since integers are immutable, I can't give you a direct
py> class I(int):
So even with ints (or at least a mutable subclass of ints),
HTH,
STeVe
|