Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Python infinite list?

Name: Anonymous 2011-12-13 20:22

hey guys playing around with python came up with this (made the example as simple as possible to reproduce the same behavior):

a=[[]]
a[0].append({0:a})

a[0][0][0][0][0][0][0][0][0] (no matter how many initial list objects you reference later, the result is the object itself, re-referenced to itself and go on to eternity)

anyone know more?

Name: Anonymous 2011-12-21 8:19

ask /prog/

Don't change these.
Name: Email:
Entire Thread Thread List