Message182339
>> from foo import bar
>> Here bar can be not module, but an attribute of foo (for example, os.path).
> Serhiy: What exception is raised in that situation is controlled by the eval loop, not importlib so that would be a separate change.
Just to clarify from this exchange, is there a chance we will use this same exception type (perhaps in a later change) in cases where bar is not found? If so, I think it's worth considering something like "NotFoundImportError" or "ImportNotFoundError" that doesn't single out module. Importing classes, etc. is quite a common pattern (e.g. examples appear in PEP 8). |
|
| Date |
User |
Action |
Args |
| 2013-02-18 20:10:46 | chris.jerdonek | set | recipients:
+ chris.jerdonek, barry, brett.cannon, pitrou, ezio.melotti, Arfrever, cvrebert, asvetlov, eric.snow, serhiy.storchaka |
| 2013-02-18 20:10:46 | chris.jerdonek | set | messageid: <[email protected]> |
| 2013-02-18 20:10:46 | chris.jerdonek | link | issue15767 messages |
| 2013-02-18 20:10:46 | chris.jerdonek | create | |
|