Last active
September 26, 2017 08:25
-
-
Save hluk/72999c90fda2fbe357e049c5a4535194 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class PDCClientWrapper(object): | |
def __init__(self, client, page_size): | |
self.client = client | |
self.page_size = page_size | |
def __call__(self, *args, **kwargs): | |
if 'page_size' not in kwargs: | |
kwargs['page_size'] = self.page_size | |
return self.client(*args, **kwargs) | |
def __getattr__(self, name): | |
return PDCClientWrapper(self.client.__getattr__(name), self.page_size) |
xiangge
commented
Sep 26, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment