[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zope3-checkins
Subject:    [Zope3-checkins] CVS: Packages/ZConfig - Config.py:1.11
From:       "Fred L. Drake\, Jr." <fred () zope ! com>
Date:       2002-11-26 23:08:29
[Download RAW message or body]

Update of /cvs-repository/Packages/ZConfig
In directory cvs.zope.org:/tmp/cvs-serv21208

Modified Files:
	Config.py 
Log Message:
Remove Configuration.__getitem__(); this is an evil interface, and is not
actually getting used anywhere.  (We do not want these objects to look too
much like dictionaries, since they do not always behave that way.)


=== Packages/ZConfig/Config.py 1.10 => 1.11 ===
--- Packages/ZConfig/Config.py:1.10	Mon Nov 25 17:52:16 2002
+++ Packages/ZConfig/Config.py	Tue Nov 26 18:08:28 2002
@@ -137,18 +137,6 @@
                     L2.append(k)
             return L2
 
-    def __getitem__(self, key):
-        k = key.lower()
-        if self._data.has_key(k):
-            return self._data[k]
-        elif self.delegate:
-            v = self.delegate.get(k)
-            if v is None:
-                raise KeyError(key)
-            return v
-        else:
-            raise KeyError(key)
-
     def get(self, key, default=None):
         key = key.lower()
         try:



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic