199 noprefix = '__' |
199 noprefix = '__' |
200 else: |
200 else: |
201 noprefix = None |
201 noprefix = None |
202 while True: |
202 while True: |
203 for word in words: |
203 for word in words: |
204 if word[:n] == attr and \ |
204 if (word[:n] == attr and |
205 not (noprefix and word[:n + 1] == noprefix): |
205 not (noprefix and word[:n + 1] == noprefix)): |
206 match = "{0}.{1}".format(expr, word) |
206 match = "{0}.{1}".format(expr, word) |
207 try: |
207 try: |
208 val = getattr(thisobject, word) |
208 val = getattr(thisobject, word) |
209 except Exception: |
209 except Exception: |
210 pass # Include even if attribute not set |
210 pass # Include even if attribute not set |