[Mailman-Developers] Problem with UserDict?

Barry A. Warsaw bwarsaw@cnri.reston.va.us (Barry A. Warsaw)
Fri, 3 Sep 1999 01:26:20 -0400 (EDT)


>>>>> "PH" == Paul Hebble <hebble@ncsa.uiuc.edu> writes:

    PH> I caught up with Mailman CVS today, and now bin/newlist dies
    PH> like this:

Urk.  The optional initial dictionary argument for UserDict's
constructor is a Python 1.5.2-ism.  You're running an older version of 
Python, right?  Try this patch.

-Barry

-------------------- snip snip --------------------
Index: Utils.py
===================================================================
RCS file: /projects/cvsroot/mailman/Mailman/Utils.py,v
retrieving revision 1.76
diff -c -r1.76 Utils.py
*** Utils.py	1999/09/02 20:04:20	1.76
--- Utils.py	1999/09/03 05:24:29
***************
*** 628,634 ****
      This is used in maketext so that editing templates is a bit more robust.
      """
      def __init__(self, d):
!         UserDict.__init__(self, d)
  
      def __getitem__(self, key):
          try:
--- 628,637 ----
      This is used in maketext so that editing templates is a bit more robust.
      """
      def __init__(self, d):
!         # optional initial dictionary is a Python 1.5.2-ism.  Do it this way
!         # for portability
!         UserDict.__init__(self)
!         self.update(d)
  
      def __getitem__(self, key):
          try: