diff options
author | aodag <aodag@localhost> | 2015-05-02 05:51:49 +0900 |
---|---|---|
committer | aodag <aodag@localhost> | 2015-05-02 05:51:49 +0900 |
commit | 280aaa026a93d9fe9a4e039b9d2b686838e21733 (patch) | |
tree | 62920f6a4c1f08723dd4a438efd86ebf43719ee7 /paste | |
parent | 02ffd7d23f28dde5ca94b098421479ffe1ecfdb7 (diff) | |
download | paste-git-280aaa026a93d9fe9a4e039b9d2b686838e21733.tar.gz |
replace ``has_key`` method to ``in`` operator #9fix-has_key
Diffstat (limited to 'paste')
-rw-r--r-- | paste/reloader.py | 2 | ||||
-rw-r--r-- | paste/util/classinstance.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/paste/reloader.py b/paste/reloader.py index 15c4d1c..c9d7c14 100644 --- a/paste/reloader.py +++ b/paste/reloader.py @@ -118,7 +118,7 @@ class Monitor(object): elif filename.endswith('$py.class') and \ os.path.exists(filename[:-9] + '.py'): mtime = max(os.stat(filename[:-9] + '.py').st_mtime, mtime) - if not self.module_mtimes.has_key(filename): + if filename not in self.module_mtimes: self.module_mtimes[filename] = mtime elif self.module_mtimes[filename] < mtime: print("%s changed; reloading..." % filename, file=sys.stderr) diff --git a/paste/util/classinstance.py b/paste/util/classinstance.py index ac2be3e..6436a44 100644 --- a/paste/util/classinstance.py +++ b/paste/util/classinstance.py @@ -24,7 +24,7 @@ class _methodwrapper(object): self.type = type def __call__(self, *args, **kw): - assert not kw.has_key('self') and not kw.has_key('cls'), ( + assert 'self' not in kw and 'cls' not in kw, ( "You cannot use 'self' or 'cls' arguments to a " "classinstancemethod") return self.func(*((self.obj, self.type) + args), **kw) |