We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d99ea9 commit 4c9fa5aCopy full SHA for 4c9fa5a
vm/src/pyobject.rs
@@ -389,11 +389,9 @@ impl PyContext {
389
}
390
391
pub fn add_slot_wrappers(&self, ty: &PyTypeRef) {
392
- if !ty.attributes.read().contains_key("__new__") {
393
- let new_wrapper =
394
- self.new_bound_method(self.tp_new_wrapper.clone(), ty.clone().into_object());
395
- ty.set_str_attr("__new__", new_wrapper);
396
- }
+ let new_wrapper =
+ self.new_bound_method(self.tp_new_wrapper.clone(), ty.clone().into_object());
+ ty.set_str_attr("__new__", new_wrapper);
397
398
399
pub fn is_tp_new_wrapper(&self, obj: &PyObjectRef) -> bool {
0 commit comments