@@ -2673,44 +2673,29 @@ Object doNative(PythonAbstractNativeObject self, Object[] varargs, PKeyword[] kw
26732673 @ Builtin (name = "NotImplementedType" , minNumOfPositionalArgs = 1 , constructsClass = PythonBuiltinClassType .PNotImplemented , isPublic = false )
26742674 @ GenerateNodeFactory
26752675 public abstract static class NotImplementedTypeNode extends PythonBuiltinNode {
2676- protected PythonBuiltinClass getNotImplementedClass () {
2677- return getCore ().lookupType (PythonBuiltinClassType .PNotImplemented );
2678- }
2679-
26802676 @ Specialization
26812677 public PNotImplemented module (Object cls ) {
2682- if (cls != getNotImplementedClass ()) {
2683- throw raise (TypeError , ErrorMessages .OBJ_ISNT_CALLABLE , "NotImplementedType" );
2684- } else {
2685- return PNotImplemented .NOT_IMPLEMENTED ;
2686- }
2678+ return PNotImplemented .NOT_IMPLEMENTED ;
26872679 }
26882680 }
26892681
2690- @ Builtin (name = "ellipsis" , takesVarArgs = true , takesVarKeywordArgs = true , constructsClass = PythonBuiltinClassType .PEllipsis , isPublic = false )
2682+ @ Builtin (name = "ellipsis" , minNumOfPositionalArgs = 1 , constructsClass = PythonBuiltinClassType .PEllipsis , isPublic = false )
26912683 @ GenerateNodeFactory
26922684 public abstract static class EllipsisTypeNode extends PythonBuiltinNode {
26932685 @ SuppressWarnings ("unused" )
26942686 @ Specialization
2695- public PEllipsis call (Object cls , Object args , Object kwds ) {
2687+ public PEllipsis call (Object cls ) {
26962688 return PEllipsis .INSTANCE ;
26972689 }
26982690 }
26992691
27002692 @ Builtin (name = "NoneType" , minNumOfPositionalArgs = 1 , constructsClass = PythonBuiltinClassType .PNone , isPublic = false )
27012693 @ GenerateNodeFactory
27022694 public abstract static class NoneTypeNode extends PythonBuiltinNode {
2703- protected PythonBuiltinClass getNoneClass () {
2704- return getCore ().lookupType (PythonBuiltinClassType .PNone );
2705- }
2706-
2695+ @ SuppressWarnings ("unused" )
27072696 @ Specialization
27082697 public PNone module (Object cls ) {
2709- if (cls != getNoneClass ()) {
2710- throw raise (TypeError , ErrorMessages .IS_NOT_SUBTYPE_OF , "NoneType.__new__" , cls , "NoneType" );
2711- } else {
2712- return PNone .NONE ;
2713- }
2698+ return PNone .NONE ;
27142699 }
27152700 }
27162701
0 commit comments