lundi 1 août 2016

I have written two separate files, one containing classes and the other calling them but calling one makes object of all. Why?

separate.py

    class foo():
       print 'a bunch of time consuming work'

    class tryme():
       print 'try me'*

main.py

from separate import *

foo()

It however printed both:

a bunch of time consuming work
try me

Aucun commentaire:

Enregistrer un commentaire