[[...]]
[[...]]
Adrian Eyre a.eyre at optichrome.comFri Mar 17 09:13:49 EST 2000
- Previous message (by thread): [[...]]
- Next message (by thread): [[...]]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> >>> a = [] > >>> a.append(a) > >>> a > [[...]] > > # What does it mean? Since 'a' contains a reference to 'a', which contains a reference to 'a', et cetera, the python __repr__ string would be infinite, so '...' is used to indicate this fact. > # Then I tried: > > >>> a[0].append(a) > [[...], [...]] > > > # And now I understand completely nothing Same deal, except 'a[0]' which *is* 'a' contains 2 references to 'a', etc. So you can do: >>> a[0][0][0][0][0][0][0][0][0][0][0][0][0][0]..... [[...]] ----------------------------------------------------------------- Adrian Eyre <a.eyre at optichrome.com> - http://www.optichrome.com
- Previous message (by thread): [[...]]
- Next message (by thread): [[...]]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list