What I have is a value found in:
value.number.odd = 7
number.odd
is an input by the user, in x
.
and so if x='number.odd'
, I was hoping that:
getattr(value, x)
would display what value.number.odd
would, but it doesn't. Instead I get:
AttributeError: missing attribute number.odd
EDIT:
Input x can also be something like X='number', or 'number.negative.prime'