A question about reference in Python.
Aaron Brady
castironpi at gmail.com
Mon Dec 8 15:15:59 EST 2008
On Dec 8, 9:18 am, Joe Strout <j... at strout.net> wrote:
> On Dec 7, 2008, at 10:26 PM, Group wrote:
>
> > Now, I want to write a Red-Black Tree, and a List structure. In C/C+
> > +, I can
> > use pointers to refer to children notes (or next notes). But, in
> > Python, how
> > can I do it? Except the sequence, I know not any way.
>
> Any variable in Python is a reference, which is roughly analogous to a
> pointer type in C/C++. For details and examples, see: <http://www.strout.net/info/coding/valref/
You can use any variable. Python doesn't make copies unless
explicitly asked.
More information about the Python-list
mailing list