[Zope3-checkins] CVS: Zope3/src/zope/configuration - config.py:1.19

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Mar 2 09:26:31 EST 2004


Update of /cvs-repository/Zope3/src/zope/configuration
In directory cvs.zope.org:/tmp/cvs-serv22415/src/zope/configuration

Modified Files:
	config.py 
Log Message:


Fixed comment typo.




=== Zope3/src/zope/configuration/config.py 1.18 => 1.19 ===
--- Zope3/src/zope/configuration/config.py:1.18	Mon Mar  1 17:39:31 2004
+++ Zope3/src/zope/configuration/config.py	Tue Mar  2 09:26:30 2004
@@ -120,6 +120,8 @@
         1
         >>> c.resolve('..interface') is zope.interface
         1
+        >>> c.resolve('unicode')
+        <type 'unicode'>
         """
 
         name = dottedname.strip()
@@ -131,8 +133,15 @@
             raise ValueError(
                 "Trailing dots are no longer supported in dotted names")
 
+        if len(names) == 1:
+            # Check for built-in objects
+            marker = object()
+            obj = __builtins__.get(names[0], marker)
+            if obj is not marker:
+                return obj
+
         if not names[0]:
-            # Got a relative name. Conver it to abs using package info
+            # Got a relative name. Convert it to abs using package info
             if self.package is None:
                 raise ConfigurationError(
                     "Can't use leading dots in dotted names, "




More information about the Zope3-Checkins mailing list