Skip to content

Instantly share code, notes, and snippets.

@hluk hluk/
Last active Sep 26, 2017

What would you like to do?
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)

This comment has been minimized.

Copy link

commented Sep 26, 2017

from pdc_client import PDCClient
server= 'upstream'
client = PDCClient(server, page_size=1)
#client = PDCClient(server)
client1 = PDCClient(server, page_size=3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.