{"action":"opened","issue":{"url":"https://api.github.com/repos/GrahamDumpleton/wrapt/issues/89","repository_url":"https://api.github.com/repos/GrahamDumpleton/wrapt","labels_url":"https://api.github.com/repos/GrahamDumpleton/wrapt/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/GrahamDumpleton/wrapt/issues/89/comments","events_url":"https://api.github.com/repos/GrahamDumpleton/wrapt/issues/89/events","html_url":"https://github.com/GrahamDumpleton/wrapt/issues/89","id":179630006,"number":89,"title":"ObjectProxy subclass docstring not accessible","user":{"login":"oobug","id":2401959,"avatar_url":"https://avatars.githubusercontent.com/u/2401959?v=3","gravatar_id":"","url":"https://api.github.com/users/oobug","html_url":"https://github.com/oobug","followers_url":"https://api.github.com/users/oobug/followers","following_url":"https://api.github.com/users/oobug/following{/other_user}","gists_url":"https://api.github.com/users/oobug/gists{/gist_id}","starred_url":"https://api.github.com/users/oobug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oobug/subscriptions","organizations_url":"https://api.github.com/users/oobug/orgs","repos_url":"https://api.github.com/users/oobug/repos","events_url":"https://api.github.com/users/oobug/events{/privacy}","received_events_url":"https://api.github.com/users/oobug/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-27T22:18:47Z","updated_at":"2016-09-27T22:18:47Z","closed_at":null,"body":"I've defined a subclass of wrapt.ObjectProxy with a docstring. Example:\r\n\r\n```\r\nclass CustomWrapper(wrapt.ObjectProxy):\r\n    \"\"\"A wrapper that adds a method to my object.\"\"\"\r\n    \r\n    def CustomMethod(self):\r\n        \"\"\"Prints \"You found me!\" \"\"\"\r\n        print \"You found me!\"\r\n```\r\n\r\nI can access the docstring of the CustomMethod by accessing the __doc__ property, either on the class method or on an instance of the class. However, I cannot seem to access the docstring of the custom wrapper class itself.\r\n\r\n```\r\n>>> CustomWrapper.__doc__\r\n<property object at 0x03672C90>\r\n>>> CustomWrapper.__dict__['__doc__']\r\n<property object at 0x03672C90>\r\n>>> help(CustomWrapper)\r\nHelp on class CustomWrapper:\r\n\r\nclass CustomWrapper(ObjectProxy)\r\n |  Method resolution order:\r\n |      CustomWrapper\r\n |      ObjectProxy\r\n |      NewBase\r\n |      __builtin__.object\r\n |\r\n |  Methods defined here:\r\n |\r\n |  CustomMethod(self)\r\n |      Prints \"You found me!\" \r\n |\r\n |  ----------------------------------------------------------------------\r\n |  Data descriptors defined here:\r\n |\r\n |  __dict__\r\n |\r\n |  __weakref__\r\n |\r\n |  ----------------------------------------------------------------------\r\n |  Methods inherited from ObjectProxy:\r\n |\r\n |  __abs__(self)\r\n ...\r\n>>> obj = CustomWrapper(my_cool_object)\r\n>>> obj.__doc__\r\n<property object at 0x03672C90>\r\n>>> obj.__dict__['__doc__']\r\n<property object at 0x03672C90>\r\n```\r\n\r\nHow do I access the class-level docstring I've written? Is there a different way I should be doing this?\r\n"}}
{"actor":{"display_login":"oobug"}}