mardi 6 juin 2017

python if __name__ = __name__: this code we can use only wen developing?

if __name__ = __name__:
 do_something() 

If we use this for skipping cod after expression when we import module will we use this on ready program packages? And if yes how can use this code when main package is one and he controlling other modules?

Aucun commentaire:

Enregistrer un commentaire