From fcbc702ae574a7a9852e251150ef64cd64c32a1c Mon Sep 17 00:00:00 2001 From: Ryan McGrath Date: Sun, 15 Jan 2012 13:59:28 -0500 Subject: [PATCH] Fixes an issue in the 1.4.5 point release, first pointed out by @michaelhelmick, fixed thanks to "tatz_tsuchiya". --- twython/twython.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/twython/twython.py b/twython/twython.py index 7cb67f4..f390a62 100644 --- a/twython/twython.py +++ b/twython/twython.py @@ -176,8 +176,10 @@ class Twython(object): # If they don't do authentication, but still want to request unprotected resources, we need an opener. self.client = httplib2.Http(**client_args) # register available funcs to allow listing name when debugging. + def setFunc(key): + return lambda **kwargs: self._constructFunc(key, **kwargs) for key in api_table.keys(): - self.__dict__[key] = lambda **kwargs: self._constructFunc(key, **kwargs) + self.__dict__[key] = setFunc(key) def _constructFunc(self, api_call, **kwargs): # Go through and replace any mustaches that are in our API url. @@ -503,4 +505,4 @@ class Twython(object): def encode(text): if isinstance(text, (str,unicode)): return Twython.unicode2utf8(text) - return str(text) \ No newline at end of file + return str(text)