"Lizhi Yang" <yangli...@gmail.com> wrote
When I define functions in a Module, how to avoid override the name of
existing functions?
Do you mean other functions within the same module or do
you mean functions in other modules?
For the first case, keep the number of functions to a reasonable number
so you can remember what's in there, and use classes top group related
functions together. If you have too many functions in a single module it
gets difficult for the module user to remember them too so its a good
idea to split big modules up when they get too busy.
For the second case you don;t need to woory because thats why we
use modules - to separate out the namespaces. So if you have two
functions f() inn two modules A and B you just import A and B and
access A.f() and B.f()
For example:
define func1():
define func2():
define func1():
Is there anyway to pop up the warnings?
Kent mentioned support tools already.
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor