bpo-36743: __get__ is sometimes called without the owner argument (#12992)

This commit is contained in:
Raymond Hettinger 2019-08-29 01:27:42 -07:00 committed by GitHub
parent 84125fed2a
commit 0dac68f1e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 13 deletions

View file

@ -283,7 +283,7 @@ except AttributeError:
class DocDescriptor:
"""Helper for builtins.open.__doc__
"""
def __get__(self, obj, typ):
def __get__(self, obj, typ=None):
return (
"open(file, mode='r', buffering=-1, encoding=None, "
"errors=None, newline=None, closefd=True)\n\n" +