Bonjour,
J'essaye de charger des objets à partir d'une liste mais ca marche pas:
Exemple de code:
Renvoie TypeError: unbound method hello() must be called with A instance as first argument (got nothing instead)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 class A: def hello(self): print "hello a" class B: def hello(self): print "hello b" lst=(A,B) for Class in lst: Class.hello()
comment je peux faire marcher ça.
Merci
Sébastien
Partager