[Tutor] Using __ini__.py for common fonctions

Alan Gauld alan.gauld at btinternet.com
Tue Feb 14 20:25:33 CET 2012

On 14/02/12 19:08, Karim wrote:

> Advices are welcome!

Asking the same question twice does not double your chances of getting a 
reply. It may even reduce them.

As to your question, it's not the most common way to do it, it's not 
even the way I'd recommend since what it does is hide your code by 
putting it somewhere a user is not likely to guess.

In Python explicit beats implicit. Put it in a module where we can see 
where it lives. It makes maintenance much easier later.

Alan G
Author of the Learn to Program web site

More information about the Tutor mailing list