[Python-checkins] r42283 - sandbox/trunk/emailpkg/3.1/email/__init__.py

fred.drake python-checkins at python.org
Thu Feb 9 05:21:39 CET 2006


Author: fred.drake
Date: Thu Feb  9 05:21:35 2006
New Revision: 42283

Modified:
   sandbox/trunk/emailpkg/3.1/email/__init__.py
Log:
be a little lazier than before

Modified: sandbox/trunk/emailpkg/3.1/email/__init__.py
==============================================================================
--- sandbox/trunk/emailpkg/3.1/email/__init__.py	(original)
+++ sandbox/trunk/emailpkg/3.1/email/__init__.py	Thu Feb  9 05:21:35 2006
@@ -73,11 +73,11 @@
 
 class LazyImporter(object):
   def __init__(self, module_name):
-      self.__module_name = 'email.' + module_name
+      self.__name__ = 'email.' + module_name
 
   def __getattr__(self, name):
-      __import__(self.__module_name)
-      mod = sys.modules[self.__module_name]
+      __import__(self.__name__)
+      mod = sys.modules[self.__name__]
       self.__dict__.update(mod.__dict__)
       return getattr(mod, name)
 


More information about the Python-checkins mailing list