File tree Expand file tree Collapse file tree 4 files changed +21
-6
lines changed Expand file tree Collapse file tree 4 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -1687,10 +1687,10 @@ class D(C):
16871687 self .assertEqual (d .foo (1 ), (d , 1 ))
16881688 self .assertEqual (D .foo (d , 1 ), (d , 1 ))
16891689 sm = staticmethod (None )
1690- self .assertEqual (sm .__dict__ , {'__doc__' : None })
1690+ self .assertEqual (sm .__dict__ , {'__doc__' : None . __doc__ })
16911691 sm .x = 42
16921692 self .assertEqual (sm .x , 42 )
1693- self .assertEqual (sm .__dict__ , {"x" : 42 , '__doc__' : None })
1693+ self .assertEqual (sm .__dict__ , {"x" : 42 , '__doc__' : None . __doc__ })
16941694 del sm .x
16951695 self .assertNotHasAttr (sm , "x" )
16961696
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ def test_attr_matches(self):
5555 if x .startswith ('s' )])
5656 self .assertEqual (self .stdcompleter .attr_matches ('tuple.foospamegg' ), [])
5757 expected = sorted ({'None.%s%s' % (x ,
58- '()' if x == '__init_subclass__'
58+ '()' if x in ( '__init_subclass__' , '__class__' )
5959 else '' if x == '__doc__'
6060 else '(' )
6161 for x in dir (None )})
Original file line number Diff line number Diff line change @@ -2007,6 +2007,11 @@ static PyNumberMethods none_as_number = {
20072007 0 , /* nb_index */
20082008};
20092009
2010+ PyDoc_STRVAR (none_doc ,
2011+ "NoneType()\n"
2012+ "--\n\n"
2013+ "The type of the None singleton." );
2014+
20102015PyTypeObject _PyNone_Type = {
20112016 PyVarObject_HEAD_INIT (& PyType_Type , 0 )
20122017 "NoneType" ,
@@ -2028,7 +2033,7 @@ PyTypeObject _PyNone_Type = {
20282033 0 , /*tp_setattro */
20292034 0 , /*tp_as_buffer */
20302035 Py_TPFLAGS_DEFAULT , /*tp_flags */
2031- 0 , /*tp_doc */
2036+ none_doc , /*tp_doc */
20322037 0 , /*tp_traverse */
20332038 0 , /*tp_clear */
20342039 _Py_BaseObject_RichCompare , /*tp_richcompare */
@@ -2106,6 +2111,11 @@ static PyNumberMethods notimplemented_as_number = {
21062111 .nb_bool = notimplemented_bool ,
21072112};
21082113
2114+ PyDoc_STRVAR (notimplemented_doc ,
2115+ "NotImplementedType()\n"
2116+ "--\n\n"
2117+ "The type of the NotImplemented singleton." );
2118+
21092119PyTypeObject _PyNotImplemented_Type = {
21102120 PyVarObject_HEAD_INIT (& PyType_Type , 0 )
21112121 "NotImplementedType" ,
@@ -2127,7 +2137,7 @@ PyTypeObject _PyNotImplemented_Type = {
21272137 0 , /*tp_setattro */
21282138 0 , /*tp_as_buffer */
21292139 Py_TPFLAGS_DEFAULT , /*tp_flags */
2130- 0 , /*tp_doc */
2140+ notimplemented_doc , /*tp_doc */
21312141 0 , /*tp_traverse */
21322142 0 , /*tp_clear */
21332143 0 , /*tp_richcompare */
Original file line number Diff line number Diff line change @@ -57,6 +57,11 @@ static PyMethodDef ellipsis_methods[] = {
5757 {NULL , NULL }
5858};
5959
60+ PyDoc_STRVAR (ellipsis_doc ,
61+ "ellipsis()\n"
62+ "--\n\n"
63+ "The type of the Ellipsis singleton." );
64+
6065PyTypeObject PyEllipsis_Type = {
6166 PyVarObject_HEAD_INIT (& PyType_Type , 0 )
6267 "ellipsis" , /* tp_name */
@@ -78,7 +83,7 @@ PyTypeObject PyEllipsis_Type = {
7883 0 , /* tp_setattro */
7984 0 , /* tp_as_buffer */
8085 Py_TPFLAGS_DEFAULT , /* tp_flags */
81- 0 , /* tp_doc */
86+ ellipsis_doc , /* tp_doc */
8287 0 , /* tp_traverse */
8388 0 , /* tp_clear */
8489 0 , /* tp_richcompare */
You can’t perform that action at this time.
0 commit comments