Python and classes
Posted
by
Artyom
on Stack Overflow
See other posts from Stack Overflow
or by Artyom
Published on 2010-12-24T12:49:42Z
Indexed on
2010/12/24
12:54 UTC
Read the original article
Hit count: 247
Hello, i have 2 classes.
How i call first.TQ in Second ? Without creating object First in Second.
class First:
def __init__(self):
self.str = ""
def TQ(self):
pass
def main(self):
T = Second(self.str) # Called here
class Second():
def __init__(self):
list = {u"RANDINT":first.TQ} # List of funcs maybe called in first
.....
.....
return data
© Stack Overflow or respective owner