@@ -211,11 +211,7 @@ impl PyIntRef {
211
211
212
212
fn lshift ( self , other : PyObjectRef , vm : & VirtualMachine ) -> PyResult {
213
213
if !objtype:: isinstance ( & other, & vm. ctx . int_type ( ) ) {
214
- return Err ( vm. new_type_error ( format ! (
215
- "unsupported operand type(s) for << '{}' and '{}'" ,
216
- objtype:: get_type_name( & self . as_object( ) . class( ) ) ,
217
- objtype:: get_type_name( & other. class( ) )
218
- ) ) ) ;
214
+ return Ok ( vm. ctx . not_implemented ( ) ) ;
219
215
}
220
216
221
217
if let Some ( n_bits) = get_value ( & other) . to_usize ( ) {
@@ -234,11 +230,7 @@ impl PyIntRef {
234
230
235
231
fn rshift ( self , other : PyObjectRef , vm : & VirtualMachine ) -> PyResult {
236
232
if !objtype:: isinstance ( & other, & vm. ctx . int_type ( ) ) {
237
- return Err ( vm. new_type_error ( format ! (
238
- "unsupported operand type(s) for >> '{}' and '{}'" ,
239
- objtype:: get_type_name( & self . as_object( ) . class( ) ) ,
240
- objtype:: get_type_name( & other. class( ) )
241
- ) ) ) ;
233
+ return Ok ( vm. ctx . not_implemented ( ) ) ;
242
234
}
243
235
244
236
if let Some ( n_bits) = get_value ( & other) . to_usize ( ) {
@@ -420,10 +412,9 @@ pub fn to_int(vm: &VirtualMachine, obj: &PyObjectRef, base: u32) -> PyResult<Big
420
412
}
421
413
}
422
414
} else {
423
- let type_name = objtype:: get_type_name ( & obj. class ( ) ) ;
424
415
return Err ( vm. new_type_error ( format ! (
425
416
"int() argument must be a string or a number, not '{}'" ,
426
- type_name
417
+ obj . class ( )
427
418
) ) ) ;
428
419
} ;
429
420
Ok ( val)
0 commit comments