Python does not do a good job of appending lists to lists.
Suggested-by: Reid Price <reid@nicira.com>
keyConstraints = self.key.constraintsToEnglish(escapeLiteral)
if keyConstraints:
if self.value:
- constraints += ['key ' + keyConstraints]
+ constraints.append('key %s' % keyConstraints)
else:
- constraints += [keyConstraints]
+ constraints.append(keyConstraints)
if self.value:
valueConstraints = self.value.constraintsToEnglish(escapeLiteral)
if valueConstraints:
- constraints += ['value ' + valueConstraints]
+ constraints.append('value %s' % valueConstraints)
return ', '.join(constraints)