Operator Functions
operator.pos()
Apply unary plus, which can invoke custom behavior rather than merely returning the input.
Formal Syntax & Structure
python syntaxpython
operator.pos(obj, /)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| obj | object | Object to inspect or copy. |
Return Value
object
The object result described above.
Working Example
Example Snippetpython
import operatorprint(operator.pos(-5))