How use Integer / string in EnumPropery items I have EnumProperty, and i need an integer number when i select my "Mode"

Now i have:

item = (
    ('Mode 1', "Mode 1", ""),
    ('Mode 2', "Mode 2",""))


but i need:

item = (
    (1, "Mode 1", ""),
    (2, "Mode 2",""))

class MyProperty(bpy.types.PropertyGroup):
    my_menu = EnumProperty(items = item)


but give error
Since the EnumPropertyItem(bpy_struct) only accept String as identifier,
you can use Python built-in int() and str() to convert between String and Integer.

A Quick example:

a = 13
int(str(a)) is 13 # True