@@ -2,10 +2,9 @@ use super::{PyStrRef, PyType, PyTypeRef};
2
2
use crate :: {
3
3
class:: PyClassImpl ,
4
4
convert:: ToPyObject ,
5
- function:: { PyArithmeticValue , PyComparisonValue } ,
6
5
protocol:: PyNumberMethods ,
7
- types:: { AsNumber , Comparable , Constructor , PyComparisonOp , Representable } ,
8
- Context , Py , PyObject , PyObjectRef , PyPayload , PyResult , VirtualMachine ,
6
+ types:: { AsNumber , Constructor , Representable } ,
7
+ Context , Py , PyObjectRef , PyPayload , PyResult , VirtualMachine ,
9
8
} ;
10
9
11
10
#[ pyclass( module = false , name = "NoneType" ) ]
@@ -43,7 +42,7 @@ impl Constructor for PyNone {
43
42
}
44
43
}
45
44
46
- #[ pyclass( with( Constructor , Comparable , AsNumber , Representable ) ) ]
45
+ #[ pyclass( with( Constructor , AsNumber , Representable ) ) ]
47
46
impl PyNone {
48
47
#[ pymethod( magic) ]
49
48
fn bool ( & self ) -> bool {
@@ -73,28 +72,6 @@ impl AsNumber for PyNone {
73
72
}
74
73
}
75
74
76
- impl Comparable for PyNone {
77
- fn cmp (
78
- _zelf : & Py < Self > ,
79
- other : & PyObject ,
80
- op : PyComparisonOp ,
81
- vm : & VirtualMachine ,
82
- ) -> PyResult < PyComparisonValue > {
83
- let value = match op {
84
- PyComparisonOp :: Eq => {
85
- if vm. is_none ( other) {
86
- PyArithmeticValue :: Implemented ( true )
87
- } else {
88
- PyArithmeticValue :: NotImplemented
89
- }
90
- }
91
- _ => PyComparisonValue :: NotImplemented ,
92
- } ;
93
-
94
- Ok ( value)
95
- }
96
- }
97
-
98
75
#[ pyclass( module = false , name = "NotImplementedType" ) ]
99
76
#[ derive( Debug ) ]
100
77
pub struct PyNotImplemented ;
0 commit comments