# HG changeset patch # User cmlenz # Date 1189010588 0 # Node ID ccc9614b21d318bebdc14459625aa8330cceb0ca # Parent 1f705a64f58f8f862474e72b62ad627628315733 Ported [309] to 0.9.x branch. diff --git a/babel/core.py b/babel/core.py --- 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):