Why do these sites advise against "from ... import ..."?
On Oct 2, 2012, at 5:01 PM, Python inside Maya <[email protected]> wrote: > I would love to hear some thoughts on handling python imports, specifically > in larger code depots with deeper hierarchies. > The way I see it, the safest way to go is to import > company.teamA.whatever.module > > The big draw back that I see is that the code becomes bloated with > company.teamA.whatever.module.class().method() > From that perspective - from company.teamA.whatever import module - seems > like a better choice > Then code reads module.class().method() > > This gets more and more problematic, the deeper the code depot hierarchy > is/gets. When reading up on Python imports several sites advice against using > the from-import technique. > Any input is appreciated, > > Thanks, > /Christian > -- > view archives: http://groups.google.com/group/python_inside_maya > change your subscription settings: > http://groups.google.com/group/python_inside_maya/subscribe -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
