Integer Attributes

int.real

The real component is the numeric value itself. This is a read-only attribute, accessed without parentheses. Its value has type int for the built-in int receiver. Assignment is not supported.

Formal Syntax & Structure

python syntaxpython
value.real

Return Value

int

Value obtained by attribute access.

Working Example

Example Snippetpython
value = -7print(value.real)print(type(value.real).__name__)
Python Reference