Пример #1
0
 def pair_as_kwarg_string(key, val):
     if isinstance(val, basestring):
         return "%s='%s'" % (key, _sugar.trim_str(unicode(val)))
     return "%s=%s" % (key, val)
Пример #2
0
 def __str__(self):
     if self.name:
         return _sugar.trim_str(self.name, maxlen=40)
     return self.__class__.__name__
Пример #3
0
 def __str__(self):
     if self.name:
         return _sugar.trim_str(self.name, maxlen=40)
     return self.__class__.__name__
Пример #4
0
 def pair_as_kwarg_string(key, val):
     if isinstance(val, basestring):
         return "%s='%s'" % (key, _sugar.trim_str(unicode(val)))
     return "%s=%s" % (key, val)