[Rivet-svn] r2427 - trunk/pyext

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Fri Apr 30 09:53:50 BST 2010


Author: eike
Date: Fri Apr 30 09:56:45 2010
New Revision: 2427

Log:
fix lighthisto on Python 2.3

Modified:
   trunk/pyext/lighthisto.py

Modified: trunk/pyext/lighthisto.py
==============================================================================
--- trunk/pyext/lighthisto.py	Fri Apr 30 09:50:43 2010	(r2426)
+++ trunk/pyext/lighthisto.py	Fri Apr 30 09:56:45 2010	(r2427)
@@ -14,9 +14,11 @@
 
 
 from htmlentitydefs import codepoint2name
-unichr2entity = dict( (unichr(code), u'&%s;' % name) \
-                          for code,name in codepoint2name.iteritems() \
-                          if code != 38 ) # exclude "&"
+unichr2entity = {}
+for code, name in codepoint2name.iteritems():
+    # exclude "&"
+    if code != 38:
+        unichr2entity[unichr(code)] = u"&%s;" % (name)
 
 
 def htmlescape(text, d=unichr2entity):


More information about the Rivet-svn mailing list