8474:4b9f6bd71a99 | 8483:11469e50910f |
---|---|
206 @rtype any | 206 @rtype any |
207 """ | 207 """ |
208 try: | 208 try: |
209 return var[int(attribute)] | 209 return var[int(attribute)] |
210 except Exception: | 210 except Exception: |
211 return getattr(var, attribute, None) | 211 return getattr(var, str(attribute), None) |
212 | 212 |
213 def getDictionary(self, var): | 213 def getDictionary(self, var): |
214 """ | 214 """ |
215 Public method to get the attributes of a variable as a dictionary. | 215 Public method to get the attributes of a variable as a dictionary. |
216 | 216 |