예제 #1
0
파일: __init__.py 프로젝트: adamchainz/cell
 def current(self):
     type = detect_environment()
     try:
         return getattr(self, self.map[type])
     except KeyError:
         raise KeyError(G_NOT_FOUND.format(
             type, ', '.join(keys(self.map))))
예제 #2
0
 def _iterate_keys(self):
     # userdict.keys in py3k calls __getitem__
     with self.mutex:
         return keys(self.data)
예제 #3
0
 def _iterate_keys(self):
     # userdict.keys in py3k calls __getitem__
     with self.mutex:
         return keys(self.data)
예제 #4
0
 def current(self):
     type = detect_environment()
     try:
         return getattr(self, self.map[type])
     except KeyError:
         raise KeyError(G_NOT_FOUND.format(type, ', '.join(keys(self.map))))