Author brett.cannon
Recipients Arfrever, aronacher, brett.cannon, eric.snow, ncoghlan, rhettinger
Date 2014-05-30.14:08:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1401458886.66.0.331838655609.issue20383@psf.upfronthosting.co.za>
In-reply-to
Content
Giving Eric is polymorphic first argument to types.ModuleType() is going to be tricky thanks to the fact that it is not hard-coded anywhere in the C code nor documented that the first argument must be a string (the only way it might come up is from PyModule_GetName() and even then that's not required to work as you would expect). And since we purposefully kept specs type-agnostic, you can't do a type check for a SimpleNamespace.

I think the only way for it to work is by attribute check (e.g. is 'name' or 'loader' defined on the object, regardless of value).
History
Date User Action Args
2014-05-30 14:08:07brett.cannonsetrecipients: + brett.cannon, rhettinger, ncoghlan, aronacher, Arfrever, eric.snow
2014-05-30 14:08:06brett.cannonsetmessageid: <1401458886.66.0.331838655609.issue20383@psf.upfronthosting.co.za>
2014-05-30 14:08:06brett.cannonlinkissue20383 messages
2014-05-30 14:08:05brett.cannoncreate