Portable code: __import__ demands different string types between 2 and 3

Steven D'Aprano steve+comp.lang.python at pearwood.info
Mon Dec 15 21:32:05 EST 2014


Ben Finney wrote:

> I'm increasingly of the opinion this is a subtle bug in ‘__import__’
> that should be fixed instead of worked around. But it will likely be
> rejected because the documentation advises against using ‘__import__’.
> Bah.

I think its worth raising an issue on the bug tracker and see what the core
devs think.

If you don't have and won't open an account on the tracker, if you can come
up with a minimal example that demonstrates the issue, I'll open an issue
for you. (But I'd rather you did it yourself :-)



-- 
Steven




More information about the Python-list mailing list