aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3
diff options
context:
space:
mode:
authorDavid Medina <davidmedina9@gmail.com>2012-03-04 10:37:41 +0100
committerDavid Medina <davidmedina9@gmail.com>2012-03-04 10:37:41 +0100
commited0b5d17d537e9d075c934edb8b4ccb4baa88778 (patch)
treea2ee66fe61cb0ca4bb15de321803d79d80eb8bfa /pygithub3
parentEncapsulate Link header behaviour (diff)
downloadpython-github3-ed0b5d17d537e9d075c934edb8b4ccb4baa88778.tar.xz
python-github3-ed0b5d17d537e9d075c934edb8b4ccb4baa88778.zip
Wrap result getter into partial. It's cleaner
Diffstat (limited to '')
-rw-r--r--pygithub3/core/result.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/pygithub3/core/result.py b/pygithub3/core/result.py
index 0c44b1b..c2928d2 100644
--- a/pygithub3/core/result.py
+++ b/pygithub3/core/result.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
-from urlparse import urlparse, parse_qs
+import functools
from .link import Link
@@ -10,9 +10,8 @@ class Method(object):
""" Lazy support """
def __init__(self, method, request, **method_args):
- self.method = method
- self.request = request
- self.args = method_args
+ self.method = functools.partial(method, request, **method_args)
+ self.resource = request.resource
self.cache = {}
def cached(func):