Roundup Robot added the comment:
New changeset cee04627bdd0 by Brett Cannon in branch 'default':
Issue #17099: Have importlib.find_loader() raise ValueError when
http://hg.python.org/cpython/rev/cee04627bdd0
--
nosy: +python-dev
___
Python tracker
Brett Cannon added the comment:
I decided not to backport since it shifts what exception is raised.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17099
Changes by Gökcen Eraslan gokcen.eras...@gmail.com:
--
nosy: +gkcn
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17099
___
___
Python-bugs-list
Changes by Ankur Ankan ankuran...@gmail.com:
--
nosy: +Ankur.Ankan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17099
___
___
Python-bugs-list
Eric Snow added the comment:
My vote is for making this a ValueError in both cases (and amending the doc
appropriately as well). The error amounts to the same thing: the module did
not have loader (implicitly or explicitly). If someone wants to distinguish
between the two they can
Changes by Brett Cannon br...@python.org:
--
assignee: - brett.cannon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17099
___
___
New submission from Brett Cannon:
If __loader__ is None then ValueError is raised, but if it is not defined then
AttributeError is raised instead. Probably should harmonize around ValueError
even in the missing attribute case since __loader__ = None is equivalent to the
attribute not
Changes by Andrew Svetlov andrew.svet...@gmail.com:
--
nosy: +asvetlov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17099
___
___
Changes by Barry A. Warsaw ba...@python.org:
--
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17099
___
___
Python-bugs-list mailing
Brett Cannon added the comment:
Should mention that this is probably no harder than changing a key getattr()
call to None (as pointed out by Nick).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17099
Changes by Brett Cannon br...@python.org:
--
keywords: +easy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17099
___
___
Python-bugs-list mailing
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17099
___
___
Python-bugs-list
12 matches
Mail list logo