mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Only have type_new on object
This commit is contained in:
@@ -158,6 +158,7 @@ pub fn init(context: &PyContext) {
|
||||
|
||||
extend_class!(context, object, {
|
||||
(slot new) => new_instance,
|
||||
// yeah, it's `type_new`, but we're putting here so it's available on every object
|
||||
"__new__" => context.new_classmethod(objtype::type_new),
|
||||
"__init__" => context.new_rustfunc(object_init),
|
||||
"__class__" =>
|
||||
|
||||
@@ -235,7 +235,6 @@ pub fn init(ctx: &PyContext) {
|
||||
.add_getter(type_dict)
|
||||
.add_setter(type_dict_setter)
|
||||
.create(),
|
||||
"__new__" => ctx.new_classmethod(type_new),
|
||||
(slot new) => type_new_slot,
|
||||
"__mro__" =>
|
||||
PropertyBuilder::new(ctx)
|
||||
|
||||
Reference in New Issue
Block a user