Mercurial > babel > old > babel-test
changeset 282:6f2e313f72fb stable-0.9.x
Ported [309] to 0.9.x branch.
author | cmlenz |
---|---|
date | Wed, 05 Sep 2007 16:43:08 +0000 |
parents | f05baef78d35 |
children | 7bfd747102d7 |
files | babel/core.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/babel/core.py +++ b/babel/core.py @@ -206,9 +206,9 @@ requested locale :see: `parse_locale` """ - if type(identifier) is cls: - return identifier - return cls(*parse_locale(identifier, sep=sep)) + if isinstance(identifier, basestring): + return cls(*parse_locale(identifier, sep=sep)) + return identifier parse = classmethod(parse) def __eq__(self, other):