[kernel] r9192 - people/waldi/dkt/lib/dkt/config

Bastian Blank waldi at alioth.debian.org
Tue Jul 24 22:34:53 UTC 2007


Author: waldi
Date: Tue Jul 24 22:34:52 2007
New Revision: 9192

Log:
lib/dkt/config/base.py, lib/dkt/config/interfaces.py
- Rename methods.
- Fix.


Modified:
   people/waldi/dkt/lib/dkt/config/base.py
   people/waldi/dkt/lib/dkt/config/interfaces.py

Modified: people/waldi/dkt/lib/dkt/config/base.py
==============================================================================
--- people/waldi/dkt/lib/dkt/config/base.py	(original)
+++ people/waldi/dkt/lib/dkt/config/base.py	Tue Jul 24 22:34:52 2007
@@ -1,10 +1,10 @@
-from .interface import *
+from . import interfaces
 from dkt.interface import implements
 
 _marker = object()
 
 class Config(object):
-    implements(IConfig)
+    implements(interfaces.IConfig)
 
     __slots__ = '_data'
 
@@ -17,14 +17,14 @@
             if default == _marker:
                 raise KeyError
             return default
-        o = s.get(o, _marker)
+        o = s.get(option, _marker)
         if o == _marker:
             if default == _marker:
                 raise KeyError
             return default
         return o
 
-    def get_section(self, section, default = _marker):
+    def getSection(self, section, default = _marker):
         s = self._data.get(section, _marker)
         if s == _marker:
             if default == _marker:
@@ -32,13 +32,13 @@
             return default
         return s.copy()
 
-    def iteroptions(self, section):
+    def iterOptions(self, section):
         s = self._data.get(section, _marker)
         if s == _marker:
             raise KeyError
         return s.iterkeys()
 
-    def itersections(self):
+    def iterSections(self):
         return self._data.iterkeys()
 
     def options(self, section):
@@ -51,9 +51,9 @@
         return self._data.keys()
 
 class MutableConfig(Config):
-    implements(IMutableConfig)
+    implements(interfaces.IMutableConfig)
 
-    def add_section(self, section):
+    def addSection(self, section):
         s = self._data.get(section, _marker)
         if s == _marker:
             self._data[section] = {}
@@ -61,7 +61,7 @@
     def delete(self, section, option):
         del self._data[section][option]
 
-    def delete_section(self, section):
+    def deleteSection(self, section):
         del self._data[section]
 
     def set(self, section, option, value):

Modified: people/waldi/dkt/lib/dkt/config/interfaces.py
==============================================================================
--- people/waldi/dkt/lib/dkt/config/interfaces.py	(original)
+++ people/waldi/dkt/lib/dkt/config/interfaces.py	Tue Jul 24 22:34:52 2007
@@ -4,13 +4,13 @@
     def get(section, option, default = None):
         pass
 
-    def get_section(section, default = None):
+    def getSection(section, default = None):
         pass
 
-    def iteroptions(section):
+    def iterOptions(section):
         pass
 
-    def itersections():
+    def iterSections():
         pass
 
     def options(section):
@@ -20,13 +20,13 @@
         pass
 
 class IMutableConfig(IConfig):
-    def add_section(section):
+    def addSection(section):
         pass
 
     def delete(section, option):
         pass
 
-    def delete_section(section):
+    def deleteSection(section):
         pass
 
     def set(section, option, value):



More information about the Kernel-svn-changes mailing list