http://forum.hardware.fr/hardwaref [...] 5279-1.htm
les variables globales, c'est le MAL !
(a part dans certains cas très précis)
sinon si tu veux réellement une variable globale, ben tu crée ta variable hors de toute classe/tout fichier (genre après tes "import" ), par exemple tu crées l'int foo (foo = int())
Puis pour forcer tes fonctions à s'y référer directement, tu mets
"global foo" dedans (genre juste après le def), de cette manière tout appel a "foo" tapera directement dans la variable globale.
Message édité par masklinn le 26-07-2004 à 13:38:24
---------------
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 by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?