Message249450
| Author |
njs |
| Recipients |
Mark.Shannon, benjamin.peterson, larry, lemburg, njs, pitrou, serhiy.storchaka |
| Date |
2015年09月01日.03:18:14 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1441077495.62.0.287839188367.issue24912@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
On further thought, here's a slightly improved version of the patch I posted above.
The difference is that the first version allowed through attempted __class__ assignments where either the old or new class was a subclass of ModuleType; the new version only allows through attempted assignments if both the old AND new class are a subclass of ModuleType.
In practice this doesn't make any difference, because the compatibility-checking code will reject any attempt to switch from a ModuleType subclass to a non ModuleType subclass or vice-versa. So both patches are correct. But the new patch is more obviously correct. |
|