I try to avoid using __dict__ in favor of something like: if hasattr(self, 'ur')

http://stackoverflow.com/questions/9748678/which-is-the-best-way-to-check-for-the-existence-of-an-attribute