[EMAIL PROTECTED] wrote:
r0g:
a) Import all the other modules these functions depend on into the
modules global namespace by putting them at the top of the module or
should I...
b) Include them in each function individually.

This is a interesting topic, that requires some care.
Generally I suggest you put them at the top, so they can be found and
seen with less problems (*), it's the standard.
If a function is called ...[rarely] ... you may move the import inside
> the function itself, especially if such function isn't speed-critical.

I would amend this advice by adding that you should (in such cases) put
a commented-out import at the top level (so you can look at the top of a module's source and see what other modules it relies upon.

--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to