diff -r 0e8925323082 -r 7164eb24f949 src/ztfy/utils/interfaces.py --- a/src/ztfy/utils/interfaces.py Fri Sep 21 01:18:08 2012 +0200 +++ b/src/ztfy/utils/interfaces.py Mon Sep 24 08:49:04 2012 +0200 @@ -42,44 +42,44 @@ class IListInfo(Interface): """Custom interface used to handle list-like components""" - def count(): + def count(self): """Get list items count""" - def index(): + def index(self): """Get position of the given item""" - def __contains__(): - """Check if given value is int list""" + def __contains__(self, value): + """Check if given value is in list""" - def __getitem__(): + def __getitem__(self, index): """Return item at given position""" - def __iter__(): + def __iter__(self): """Iterator over list items""" class IListWriter(Interface): """Writer interface for list-like components""" - def append(): + def append(self, value): """Append value to list""" - def extend(): + def extend(self, values): """Extend list with given items""" - def insert(): + def insert(self, index, value): """Insert item to given index""" - def pop(): + def pop(self): """Pop item from list and returns it""" - def remove(): + def remove(self, value): """Remove given item from list""" - def reverse(): + def reverse(self): """Sort list in reverse order""" - def sort(): + def sort(self): """Sort list""" @@ -94,50 +94,50 @@ class IDictInfo(Interface): """Custom interface used to handle dict-like components""" - def keys(): + def keys(self): """Get list of keys for the dict""" - def has_key(key): + def has_key(self, key): """Check to know if dict includes the given key""" - def get(key, default=None): + def get(self, key, default=None): """Get given key or default from dict""" - def copy(): + def copy(self,): """Duplicate content of dict""" - def __contains__(key): + def __contains__(self, key): """Check if given key is in dict""" - def __getitem__(key): + def __getitem__(self, key): """Get given key value from dict""" - def __iter__(): + def __iter__(self): """Iterator over dictionnary keys""" class IDictWriter(Interface): """Writer interface for dict-like components""" - def clear(): + def clear(self): """Clear dict""" - def update(b): + def update(self, b): """Update dict with given values""" - def setdefault(key, failobj=None): + def setdefault(self, key, failobj=None): """Create value for given key if missing""" - def pop(key, *args): + def pop(self, key, *args): """Remove and return given key from dict""" - def popitem(): + def popitem(self, item): """Pop item from dict""" - def __setitem__(key, value): + def __setitem__(self, key, value): """Update given key with given value""" - def __delitem__(key): + def __delitem__(self, key): """Remove selected key from dict""" @@ -182,5 +182,8 @@ def getJSONSettings(self): """Get ZEO connection setting as a JSON dict""" + def update(self, values): + """Update connection properties from given dict values""" + def getConnection(self, wait=False): """Open ZEO connection with given settings"""