[Python-ideas] Class autoload
Greg Ewing
greg.ewing at canterbury.ac.nz
Sat Mar 3 19:13:50 EST 2018
Jamesie Pic wrote:
>
> obj = new yourmodule.YourClass()
>
> This would also eliminate the need to manage an import list at
> the beginning of a script in most case.
I like the fact that I can usually tell what modules a module
depends on by looking at the top for import statements.
If people were encouraged to scatter implicit imports
throughout the code, this would be much harder.
Also, this seems a rather subtle and non-obvious distinction
to make between two constructs that look like they should
mean exactly the same thing.
--
Greg
More information about the Python-ideas
mailing list