Review of #189: use dict.get

http://docs.python.org/2/library/stdtypes.html#dict.get
This commit is contained in:
Vincent Jacques
2013-08-22 11:41:15 +02:00
parent cc1bcd5f2d
commit 1787765a61
3 changed files with 7 additions and 16 deletions
+4 -5
View File
@@ -27,13 +27,12 @@
from __future__ import with_statement
import datetime
import GithubException
import pickle
import GithubException
import Consts
class _NotSetType:
def __repr__(self):
return "NotSet"
@@ -126,14 +125,14 @@ class GithubObject(object):
'''
:type str
'''
return Consts.get(self._headers, Consts.RES_ETAG)
return self._headers.get(Consts.RES_ETAG)
@property
def last_modified(self):
'''
:type str
'''
return Consts.get(self._headers, Consts.RES_LAST_MODIFED)
return self._headers.get(Consts.RES_LAST_MODIFED)
def update(self):