Index: feedgenerator.py
===================================================================
--- feedgenerator.py	(revision 640)
+++ feedgenerator.py	(working copy)
@@ -33,7 +33,7 @@
 
     def add_item(self, title, link, description, author_email=None,
         author_name=None, pubdate=None, comments=None, unique_id=None,
-        enclosure=None):
+        enclosure=None, category=None):
         """
         Adds an item to the feed. All args are expected to be Python Unicode
         objects except pubdate, which is a datetime.datetime object, and
@@ -49,6 +49,7 @@
             'comments': comments,
             'unique_id': unique_id,
             'enclosure': enclosure,
+            'category': category,
         })
 
     def num_items(self):
@@ -142,6 +143,12 @@
             handler.addQuickElement(u"enclosure", '',
                 {u"url": item['enclosure'].url, u"length": item['enclosure'].length,
                     u"type": item['enclosure'].mime_type})
+        if item['category'] is not None:
+            if isinstance(item['category'], list):
+                for cat in item['category']:
+                    handler.addQuickElement(u"category", cat, {})
+            else:
+                handler.addQuickElement(u"category", item['category'], {})
         handler.endElement(u"item")
 
 # This isolates the decision of what the system default is, so calling code can
