A question about reference in Python.

Joe Strout joe at strout.net
Mon Dec 8 16:18:27 CET 2008


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/ 
 >

Best,
- Joe





More information about the Python-list mailing list