diff options
-rw-r--r-- | python3.html.markdown | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/python3.html.markdown b/python3.html.markdown index 43e90299..9ce7790b 100644 --- a/python3.html.markdown +++ b/python3.html.markdown @@ -765,8 +765,13 @@ if __name__ == '__main__': print(b.say('hello')) print(b.fly) +# To take advantage of modularization by file you could place the classes above in their own files, +# say, human.py and bat.py +# to import functions from other files use the following format # from "filename-without-extension" import "function-or-class" + +# superhero.py from human import Human from bat import Bat |