pylint-bot / test

0 stars 0 forks source link

Refactor UnboundMethod and BoundMethod #257

Open pylint-bot opened 8 years ago

pylint-bot commented 8 years ago

Originally reported by: BitBucket: ceridwenv, GitHub: @ceridwen?


Aside from the distinction between unbound methods and functions being eliminated on Python 3, these classes aren't doing very much at the moment.

After removing this, the only important functionality remaining on either of these classes is the code that handles context binding in BoundMethod.infer_call_result:

        if context is None:
            context = contextmod.InferenceContext()
        context = context.clone()
        context.boundnode = self.bound

There might still need to be a Method object, but if so it will have pretty much that one method.