Only have type_new on object

This commit is contained in:
coolreader18
2019-09-29 23:22:59 -05:00
parent d22cac2dd8
commit 78069284a8
2 changed files with 1 additions and 1 deletions

View File

@@ -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__" =>

View File

@@ -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)