On 24Mar2019 17:02, Terry Reedy <tjre...@udel.edu> wrote:
On 3/24/2019 8:21 AM, Nick Coghlan wrote:
* PEP 499: Binding "-m" executed modules under their module name as
well as `__main__`
My brief response: +1 unless there is a good reason not.
There turn out to be some subtle side effects. The test suite turned up
one (easily fixed) in pdb, but there are definitely some more things to
investigate. Nick has pointed out pickle and the "python -i" option.
I'm digging into these. (Naturally, I have _never_ before used the pdb
or pickle modules, or the -i option :-)
There have been multiple double module problems reported on python-list
and likely stackoverflow. And would there be any impact on circular
imports?
Well, by binding the -m module to both __main__ and its name as denoted
on the command line one circular import is directly short circuited.
Aside from the -m module itself, I don't think there should be any other
direct effect on circular imports.
Did you have a specific scenario in mind?
Cheers,
Cameron Simpson <c...@cskk.id.au>
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com