Fixed the __str__ of some Value subclasses.

This commit is contained in:
Jeremy Fincher 2004-02-17 06:30:12 +00:00
parent c0dad919d6
commit 2dab520e66

View File

@ -345,6 +345,7 @@ class Regexp(Value):
'between the regexp and the recorded string value.' 'between the regexp and the recorded string value.'
def __str__(self): def __str__(self):
self() # Gotta update if we've been reloaded.
return self.sr return self.sr
class SeparatedListOf(Value): class SeparatedListOf(Value):
@ -370,8 +371,9 @@ class SeparatedListOf(Value):
Value.setValue(self, self.List(v)) Value.setValue(self, self.List(v))
def __str__(self): def __str__(self):
if self.value: value = self()
return self.joiner(self.value) if value:
return self.joiner(value)
else: else:
# We must return *something* here, otherwise down along the road we # We must return *something* here, otherwise down along the road we
# can run into issues showing users the value if they've disabled # can run into issues showing users the value if they've disabled