This is possible with new-style formatting:
print "{0[break_points][0]:d}".format(d)
or
print "{break_points[0]:d}".format(**d)
The string on which this method is called can contain literal text or replacement fields delimited by braces
{}
. Each replacement field contains either the numeric index of a positional argument, or the name of a keyword argument.
The field_name itself begins with an
arg_name
that is either a number or a keyword. If it’s a number, it refers to a positional argument, and if it’s a keyword, it refers to a named keyword argument....
The arg_name can be followed by any number of index or attribute expressions. An expression of the form
'.name'
selects the named attribute usinggetattr()
, while an expression of the form'[index]'
does an index lookup using__getitem__()
.