The threading module contains buggy code: class Thread(_Verbose): ... def start(self): assert self.__initialized, "Thread.__init__() not called" assert not self.__started, "thread already started" ...
If you run such code with python -O, weird stuff may happen when you call mythread.start() multiple times. -O removes assert statements so the code won't fail with an AssertionError which would be expected. So what real exception should Thread.start() raise? I have suggested adding an IllegalStateError modelled after java's IllegalStateException, but that idea was rejected. So what exception should be raised here, is it a RuntimeError? -- mvh Björn _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com