[Checkins] SVN: Sandbox/malthe/chameleon.core/ Marker must be a subclassed object; it must evaluate to False in order to work with the translation machinery.

Malthe Borch mborch at gmail.com
Thu Nov 20 07:39:08 EST 2008


Log message for revision 93154:
  Marker must be a subclassed object; it must evaluate to False in order to work with the translation machinery.

Changed:
  U   Sandbox/malthe/chameleon.core/CHANGES.txt
  U   Sandbox/malthe/chameleon.core/src/chameleon/core/generation.py

-=-
Modified: Sandbox/malthe/chameleon.core/CHANGES.txt
===================================================================
--- Sandbox/malthe/chameleon.core/CHANGES.txt	2008-11-20 12:29:29 UTC (rev 93153)
+++ Sandbox/malthe/chameleon.core/CHANGES.txt	2008-11-20 12:39:07 UTC (rev 93154)
@@ -4,6 +4,10 @@
 HEAD
 ~~~~
 
+- This was the wrong fix, however; what needed to be changed is that
+  the class of the marker isntance must be available at
+  module-scope. [malthe]
+
 - Changed generation.marker back to a normal object instance. Otherwise we get
   PicklingError: Can't pickle <class 'chameleon.core.generation.marker'>:
   it's not the same object as chameleon.core.generation.marker. [hannosch]

Modified: Sandbox/malthe/chameleon.core/src/chameleon/core/generation.py
===================================================================
--- Sandbox/malthe/chameleon.core/src/chameleon/core/generation.py	2008-11-20 12:29:29 UTC (rev 93153)
+++ Sandbox/malthe/chameleon.core/src/chameleon/core/generation.py	2008-11-20 12:39:07 UTC (rev 93154)
@@ -23,11 +23,11 @@
 %(body)s
 """
 
-class marker(object):
+class Marker(object):
     def __nonzero__(self):
         return False
 
-marker = object()
+marker = Marker()
 
 def fast_translate(msgid, domain=None, mapping=None, context=None,
                    target_language=None, default=None):



More information about the Checkins mailing list