Int (hwx.inspire.Attributes)#

class Int(default=0, **kwds)#

Bases: Attribute

Store integer value

Attribute Table#

Name

Type

default

int

Method Table#

Name

Description

castForSet (self, obj, value)

Converts and validates the specified int value before setting the value.

create (self, obj)

Creates an int attribute for the specified object.

Example

from hwx.inspire import *

class Counter(GeneralObject):
value = Int(1)

counter = Counter()
counter.value += 1
print(counter.value)
create(obj)#

Creates an int attribute for the specified object.

castForSet(obj, value)#

Converts and validates the specified int value before setting the value.

class Value(value, obj, attr)#

Bases: int