problem with an infinite loop

Ionel Simionescu ionel at psy.uva.nl
Wed Dec 15 07:29:55 EST 1999


Hi,

The code below represents an erroneous snippet that crashes Python
(1.5.2/WinNT) in a very reproductible manner.

Maybe this kind of error can be intercepted by the interpreter and raise an
exception.

ionel

---

# I know this code is bad.

class node:
    def __init__(self, name=''):
        self.name = name

    def __setattr__(self, name, value):
        if name=='name': self.name = value

f = node()






More information about the Python-list mailing list