Reference
Mixed methods.
MixedMethod
Bases: Generic[T, P, R, Q, S]
Represents mixed methods.
Source code in mixed_methods/core.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
|
type_method: Callable[Concatenate[Type[T], P], R]
instance-attribute
The type method to use.
instance_method: Callable[Concatenate[T, Q], S]
instance-attribute
The instance method to use.
mixed_method(type_method: Callable[Concatenate[Type[T], P], R], instance_method: Callable[Concatenate[T, Q], S]) -> MixedMethod[T, P, R, Q, S]
Creates mixed methods.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
type_method |
Callable[Concatenate[Type[T], P], R]
|
The type method of the mixed method. |
required |
instance_method |
Callable[Concatenate[T, Q], S]
|
The instance method of the mixed method. |
required |
Returns:
Type | Description |
---|---|
MixedMethod[T, P, R, Q, S]
|
The created mixed method. |
Source code in mixed_methods/core.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|