On Friday, April 28, 2017 at 8:23:43 AM UTC-5, Peter Otten wrote:
> Stefan Ram wrote:
> 
> > Peter Otten <__pete...@web.de> writes:
> >>one of the modules in Python's standard library IDLE will try to run with
> >>your module rather than the one it actually needs. Common candidates are
> >>code.py or string.py, but there are many more.
> > 
> >   I know this from Java:
> > 
> >   When you write a program
> > 
> > ... main( final String[] args ) ...
> > 
> >   and then create a file »String.class« in the program's
> >   directory, the program usually will not work anymore.
> > 
> >   However, in Java one can use an absolute path as in,
> > 
> > ... main( final java.lang.String[] args ) ...
> > 
> >   , in which case the program will still work in the
> >   presence of such a »String.class« file.
> > 
> >   I wonder whether Python also might have such a kind
> >   of robust "absolute addressing" of a module.
> 
> While I would welcome such a "reverse netloc" scheme or at least a "std" 
> toplevel package that guarantees imports from the standard library I fear 
> the pain is not yet big enough ;)

The pain will only get more intense with time. This is an issue that Python3 
should have solved when it broke so much backwards compatibility. Better to 
break it all at once; than again, and again, and again.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to