New submission from Stefan Krah:
In Python2.7, the cls parameter shows up in pydoc:
frombuf(cls, buf) from __builtin__.type
Construct a TarInfo object from a 512 byte string buffer.
In 3.5, it doesn't:
frombuf(buf, encoding, errors) from builtins.type
Construct a TarInfo object from a 512 byte bytes object.
inspect.signature shows 'self', but not 'cls':
>>> from tarfile import *
>>> from inspect import *
>>> signature(TarInfo.create_gnu_header)
<Signature at 0x7f50cf110cf0 "(self, info, encoding, errors)">
>>> signature(TarInfo.frombuf)
<Signature at 0x7f50cf11cc88 "(buf, encoding, errors)">
So my guess is that this is an oversight. How about the C docstrings?
Can we get "$cls" for classmethods?
----------
messages: 217606
nosy: Yury.Selivanov, larry, skrah
priority: normal
severity: normal
status: open
title: inspect and class methods
type: behavior
versions: Python 3.4, Python 3.5
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue21399>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com