python can't count!

Dominik Kaspar dokaspar at student.ethz.ch
Thu Oct 2 11:02:48 EDT 2003


hello

i'm wondering if i'm just too stupid for python or if i've missed
something fundamentally important of its semantics.
Why does the following program result in the TypeError: print_it()
takes exactly 1 argument (2 given)?
I don't see any function passing or receiving 2 arguments here... am i
blind?

import threading

class Server(threading.Thread):
    def print_it(n):
        print n

    def run(self):
        self.print_it(34)
        while 1:
            pass

s = Server()
s.start()




More information about the Python-list mailing list