Mercurial > babel > old > mirror
comparison babel/core.py @ 434:5f1ff3442ef7
Add a __ne__ method for the Locale class.
Submitted by: mitsuhiko
author | jruigrok |
---|---|
date | Wed, 19 Aug 2009 12:15:13 +0000 |
parents | b4f01db57a9e |
children | 9549bb80a5a7 |
comparison
equal
deleted
inserted
replaced
433:34c1a971051e | 434:5f1ff3442ef7 |
---|---|
213 return identifier | 213 return identifier |
214 parse = classmethod(parse) | 214 parse = classmethod(parse) |
215 | 215 |
216 def __eq__(self, other): | 216 def __eq__(self, other): |
217 return str(self) == str(other) | 217 return str(self) == str(other) |
218 | |
219 def __ne__(self, other): | |
220 return not self.__eq__(other) | |
218 | 221 |
219 def __repr__(self): | 222 def __repr__(self): |
220 return '<Locale "%s">' % str(self) | 223 return '<Locale "%s">' % str(self) |
221 | 224 |
222 def __str__(self): | 225 def __str__(self): |