Affectation en python, !

Affectation en python, ! - Python - Programmation

Marsh Posté le 14-06-2007 à 14:55:47    

bonjour,  
j'ai du mal a comprendre pourquoi on fait ce-ci:

Code :
  1. self.controllerClass    = controllerClass
  2.         self.frameClass         = frameClass
  3.         self.datastructureClass = datastructureClass
  4.         self.connectionsClass   = connectionsClass

Reply

Marsh Posté le 14-06-2007 à 14:55:47   

Reply

Marsh Posté le 14-06-2007 à 15:03:01    

[:petrus75]


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box, and replicate and expand beyond their wildest dreams by throwing away the limits imposed by overbearing genetic r
Reply

Marsh Posté le 14-06-2007 à 15:06:49    

self.controllerClass : attribut
controllerClass : variable locale
 
Si ces deux notions te sont étrangères, apprends d'abord le Python puis code ensuite en Python.

Reply

Marsh Posté le 14-06-2007 à 15:21:56    

Chaos Intestinal a écrit :

self.controllerClass : attribut


variable membre plutôt, c'est probablement un constructeur :o


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box, and replicate and expand beyond their wildest dreams by throwing away the limits imposed by overbearing genetic r
Reply

Marsh Posté le 14-06-2007 à 15:26:57    

masklinn a écrit :

variable membre plutôt, c'est probablement un constructeur :o


 
Je pensais naïvement que les deux étaient synonymes.
J'avais bien vu que ça sentait le constructeur ceci dit :o

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed