138 karma · joined March 21, 2009
I think Im going to register in Oregon b/c I would have access to individuals who could act as registered agents but I still need to find the answer to the above question.
a, use your head, don't let convention override reason b, In general, keep module imports at the top of the file organized by type & package with the caveat that a large # of imports (say more than 10 or 20) may indicate the module is too ambitious and is a candidate for refactoring.
I think I might be converging on a reasonable practice of doing all imports in one place while including basic comments and/or just insuring at least that imports are grouped by category / 'package'.
# Sys imports import os, sys, urllib
# django imports import django.foo ...
# google apps imports import gdata.foo ...