Ahh, the wording screwed me up.
If I'm understanding your comment correctly this time, it would look something like:
getattr(thing, b'attribute_name')
If I'm understanding your comment correctly this time, it would look something like:
getattr(thing, b'attribute_name')
getattr(thing, u'attribute_with_unicode_characters')
This would work in both python 2.7 and 3.9 (probably works with other 3.X versions but it's the one I actually tried).