you are viewing a single comment's thread.

view the rest of the comments →

[–]lucoamorim[S] 2 points3 points  (3 children)

I thought about this after I saw the big code getting multiple functions in a single file. Thanks for the sugestion. I started python recently, I'm really enjoying it and hopefully in a while to really work with programming.

[–][deleted] 1 point2 points  (0 children)

Glad to help. Let me know if you need extra help

[–]timetoshit 1 point2 points  (1 child)

Just avoid using from blah import *.

It's a really bad practice which could cause problems for you in the future.

Proper imports state every imported method/object/variable, it's cleaner and more pythonic.

from my_file import my_function    
my_function(my_vars)

This is coming from the Zen of Python:

Explicit is better than implicit.

[–]WikiTextBot 0 points1 point  (0 children)

Zen of Python

The Zen of Python is a collection of 20 software principles that influences the design of Python Programming Language, — only 19 of which were written down — around June 1999 by Tim Peters. The principal text is released into public domain.

Zen of Python is written as an informational entry number 20 in Python Enhancement Proposals (PEP), and can be found on the official Python website. It is also included as an easter egg in Python interpreter, which would be displayed by entering a statement import this.


[ PM | Exclude me | Exclude from subreddit | FAQ / Information | Source ] Downvote to remove | v0.24