[all] pylint refinements
Improve code by bringing up the pylint score a bit. see #23
This commit is contained in:
parent
252260c249
commit
0c7884d170
4 changed files with 10 additions and 8 deletions
|
@ -6,13 +6,16 @@ this module
|
|||
"""
|
||||
|
||||
class Store(object):
|
||||
"""Interface for storing and retrieving simple values"""
|
||||
def __init__(self):
|
||||
self._data = {}
|
||||
|
||||
def set(self, key, value):
|
||||
"""Set 'key' to 'value', overwriting 'key' if it exists already"""
|
||||
self._data[key] = value
|
||||
|
||||
def get(self, key, default=None):
|
||||
"""Return the current value of 'key', or 'default' if 'key' is not set"""
|
||||
return self._data.get(key, default)
|
||||
|
||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue