Message254878
| Author |
gvanrossum |
| Recipients |
alexandre.vassalotti, gvanrossum, maatt, pitrou, serhiy.storchaka |
| Date |
2015年11月19日.05:01:57 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1447909317.58.0.452395230215.issue25472@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Actually, I just found an embarrassingly simple fix:
diff --git a/src/typing.py b/src/typing.py
index d900036..49c4a06 100644
--- a/src/typing.py
+++ b/src/typing.py
@@ -981,7 +981,7 @@ class GenericMeta(TypingMeta, abc.ABCMeta):
"Cannot substitute %s for %s in %s" %
(_type_repr(new), _type_repr(old), self))
- return self.__class__(self.__name__, self.__bases__,
+ return self.__class__(self.__name__, (self,) + self.__bases__,
dict(self.__dict__),
parameters=params,
origin=self,
I'll go check this in now, together with a test. |
|