D
Dominik Kaspar
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()
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()