Ah, I got it, I think:

    def __init__(self, subject=None, text=None, attachments=set()):

This usually does not what you want in Python. You should do
"attachments=None" and explicitly check for None in the function body:

--- 
/home/ubuntu-archive/apport-retracer-i386/apport/launchpadbugs/commentsbase.py.orig
 2008-02-18 12:26:38.000000000 +0000
+++ 
/home/ubuntu-archive/apport-retracer-i386/apport/launchpadbugs/commentsbase.py  
    2008-02-18 12:27:13.000000000 +0000
@@ -4,10 +4,11 @@
 
 
 class LPComment(object):
-    def __init__(self, subject=None, text=None, attachments=set()):
+    def __init__(self, subject=None, text=None, attachments=None):
         self.subject = subject
         self.text = text
-        self.__attachments = set()
+        if attachments is None:
+           attachments = set()
         if isinstance(attachments, LPAttachment):
             self.__attachments = set([attachments])
         else:

(This removes the redundant self.__attachments = set(), too, since it's
assigned in both the then and else clause further down).


** Changed in: python-launchpad-bugs (Ubuntu)
       Status: New => Confirmed

-- 
TypeError: argument 2 to map() must support iteration
https://bugs.launchpad.net/bugs/192892
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to