Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-05-17 22:57:25 +03:00
parent 7e6d4f3188
commit 8e31948e65
2 changed files with 4 additions and 0 deletions

View File

@ -599,6 +599,8 @@ RawInstance(<context>, <constructor>, ..)
- get result of `.__new__(..)` if defined, or - get result of `.__new__(..)` if defined, or
- if prototype is a function or `.__call__(..)` is defined, create a - if prototype is a function or `.__call__(..)` is defined, create a
wrapper function, or wrapper function, or
- if constructor's `.__proto__` has a `.__rawinstance__(..)` use it
to create an instance, or
- if constructor's `.__proto__` is a function (constructor) use it - if constructor's `.__proto__` is a function (constructor) use it
to create an instance, or to create an instance, or
- use `{}`. - use `{}`.

View File

@ -470,6 +470,8 @@ function(base, ...objects){
// -> call and use its return value // -> call and use its return value
// - if prototype is a function or if .__call__(..) is defined // - if prototype is a function or if .__call__(..) is defined
// -> use a wrapper function // -> use a wrapper function
// - if construct.__proto__ has .__rawinstance__(..)
// -> use it to create an instance
// - if constructor.__proto__ is a constructor // - if constructor.__proto__ is a constructor
// -> use it to create an instance // -> use it to create an instance
// - else // - else