Message228325
I think the check can be removed as long as an AttributeError is caught when trying to access module.__name__ and a message mentioning that the user probably meant to pass in a module is used, e.g.:
try:
name = module.__spec__.name
except AttributeError:
try:
name = module.__name__
except AttributeError:
raise TypeError("argument should be a module") |
|
Date |
User |
Action |
Args |
2014-10-03 12:53:40 | brett.cannon | set | recipients:
+ brett.cannon, ncoghlan, BreamoreBoy, eric.snow |
2014-10-03 12:53:40 | brett.cannon | set | messageid: <1412340820.08.0.717230043837.issue19468@psf.upfronthosting.co.za> |
2014-10-03 12:53:40 | brett.cannon | link | issue19468 messages |
2014-10-03 12:53:39 | brett.cannon | create | |
|