Python class that inherits from itself? How it works?

Relatively new to Python, and I saw the following construct in the PyFacebook library (source here: http://github.com/sciyoshi/pyfacebook/ blob / host / facebook/ INIT .py # L660 ). I am curious what this does because it seems like a class that inherits from itself.

class AuthProxy(AuthProxy):
    """Special proxy for facebook.auth."""

    def getSession(self):
        """Facebook API call. See http://developers.facebook.com/documentation.php?v=1.0&method=auth.getSession"""
        ...
        return result

    def createToken(self):
        """Facebook API call. See http://developers.facebook.com/documentation.php?v=1.0&method=auth.createToken"""
        ...
        return token

what does it do?

Tangentially related, I am using PyDev in Eclipse and this is flagged as a bug. I guess that is not the case. Anyway, so that Eclipse knows it's good?

+3
source share
4 answers

, AuthProxy AuthProxy, AuthProxy, .

, , x = f(x): x f , - x x. AuthProxy AuthProxy.

+11

AuthProxy, ( ) .

+3

"" AuthProxy __generate_proxies ( , exec eval:)), .

+3

Eclipse , :

AuthProxy (AuthProxy): # @UndefinedVariable

+1

Source: https://habr.com/ru/post/1728758/


All Articles