Created
January 4, 2012 14:25
-
-
Save jakul/1560255 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _pofile_or_mofile(f, type, **kwargs): | |
# ... snip | |
default_klass = type == 'pofile' and POFile or MOFile | |
klass = kwargs.get('klass', default_klass) | |
parser = kls( | |
f, | |
encoding=enc, | |
check_for_duplicates=kwargs.get('check_for_duplicates', False), | |
klass=klass, | |
) | |
# ... snip | |
class _POFileParser(object): | |
def __init__(self, pofile, *args, **kwargs): | |
# ... snip | |
klass = kwargs.get('klass', POFile) | |
# ... snip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment