I need something like this (pseudocode):
if hasattr(object, 'detail.infotext')
I mean I want to check if object has attribute details
and if it has, then if details
has a attribute named infotext
I could do it like this:
if hasattr(object, 'detail'):
if hasattr(object.detail, 'infotext'):
do something
But one-liners are so much easier to read.