how to get a list sub list item from a list?

I am trying to get a sublist(?) item from a list for a report in a operator

such as: ({‘INFO’}, “this is a report about ‘%s’” % self.list

this works great but I am actually trying to get the second item in a list such as:

list = EnumProperty(items=[(1,2,3),(a,b,c),(x,y,z)])

how would I go about getting the second value (2 or b or y) in the report example above?

EnumProperty expects triplets for the items parameter:


bpy.types.Scene.my_list = bpy.props.EnumProperty(name="My List", items = (('1', 'First', 'Description one'), ('2', 'Second', 'Description two'), ('3', 'Third', 'Description three')))

if you wanted to know what items are in the enumprop, you could access them like:

# output: 'Second'

but usually that enumprop is added to a panel - layout.prop(…)
and you wanna know what entry is active / was selected by the user:

# output: '1'

The identifier of the selected item entry is returned

Im actually using the identifier for the operator as a shortcut to accessing some items in blenders api based on context, but they are not exactly easy on the eye for the report. More specifically I’m using the enumprop in a panel AND to define its application in the operator, I suppose I could always just assign a list for both to the same effect.

lists, inside lists, inside lists, , oh ya.