Make the translation proxy pickle proof.

This commit is contained in:
Georg Brandl 2010-05-23 12:32:30 +02:00
parent 9116cf9779
commit 0dd83d9ee4

View File

@ -32,6 +32,9 @@ class _TranslationProxy(UserString.UserString, object):
return unicode(func)
return object.__new__(cls)
def __getnewargs__(self):
return (self._func,) + self._args
def __init__(self, func, *args):
self._func = func
self._args = args