New submission from Éric Araujo :
Following a discussion on IRC:
<birkenfeld> I would even prefer having more of just `object` instead of :func:`object` or :class:`object`
I think it would be feasible to write a reST role that would use inspect or pydoc to find the type. It would not violate “In the face of ambiguity, refuse the temptation to guess” if it only resolves `somebuiltin` and `some.fully.qualified.name`.
Cons: People unfamiliar with reST might confuse ``code`` with `name`; interpreting the role may prove non-trivial (either requiring importing Python module to introspect them, or keeping a mapping of names→types in some file).
Thoughts?
----------
assignee: docs@python
components: Documentation
messages: 107790
nosy: docs@python, merwok
priority: normal
severity: normal
status: open
title: Add a default role to allow writing bare `len` instead of :func:`len`
type: feature request
_______________________________________
Python tracker
http://bugs.python.org/issue8996
_______________________________________