Mercurial > public > mercurial-scm > hg
comparison mercurial/smartset.py @ 32148:2cfdf5241096
py3: use raw strings while accessing class.__dict__
The keys of class.__dict__ are unicodes on Python 3.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 28 Apr 2017 01:13:07 +0530 |
parents | 413b44003462 |
children | e962c70c0aad |
comparison
equal
deleted
inserted
replaced
32147:a77e61b45384 | 32148:2cfdf5241096 |
---|---|
243 return asclist | 243 return asclist |
244 | 244 |
245 @util.propertycache | 245 @util.propertycache |
246 def _list(self): | 246 def _list(self): |
247 # _list is only lazily constructed if we have _set | 247 # _list is only lazily constructed if we have _set |
248 assert '_set' in self.__dict__ | 248 assert r'_set' in self.__dict__ |
249 return list(self._set) | 249 return list(self._set) |
250 | 250 |
251 def __iter__(self): | 251 def __iter__(self): |
252 if self._ascending is None: | 252 if self._ascending is None: |
253 return iter(self._list) | 253 return iter(self._list) |