Represents a set of attributes that different functions can have.
Namespace: IronPython.Runtime.TypesAssembly: IronPython (in IronPython.dll) Version: 2.7
Syntax[FlagsAttribute]
public enum FunctionType
[FlagsAttribute]
public enum class FunctionType
[<FlagsAttribute>]
type FunctionType
Members
| Member name | Value | Description |
---|
| None | 0 | No flags have been set |
| Function | 1 | This is a function w/ no instance pointer |
| Method | 2 | This is a method that requires an instance |
| FunctionMethodMask | 3 | Built-in functions can encapsulate both methods and functions, in which case both bits are set |
| AlwaysVisible | 4 | True is the function/method should be visible from pure-Python code |
| ReversedOperator | 32 | True if this is a __r*__ method for a CLS overloaded operator method |
| BinaryOperator | 64 |
This method represents a binary operator method for a CLS overloaded operator method.
Being a binary operator causes the following special behaviors to kick in:
A failed binding at call time returns NotImplemented instead of raising an exception
A reversed operator will automatically be created if:
1. The parameters are both of the instance type
2. The parameters are in reversed order (other, this)
This enables simple .NET operator methods to be mapped into the Python semantics.
|
| ModuleMethod | 128 |
A method declared on a built-in module
|
See Also