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

NameTypeDescription
objobjectObject to inspect or copy.

Return Value

object

The object result described above.

Working Example

Example Snippetpython
import operatorprint(operator.pos(-5))
Python Reference