[New-bugs-announce] [issue8996] Add a default role to allow writing bare `len` instead of :func:`len`

Éric Araujo report at bugs.python.org
Mon Jun 14 17:09:12 CEST 2010


New submission from Éric Araujo <merwok at netwok.org>:

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 at python
components: Documentation
messages: 107790
nosy: docs at 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 <report at bugs.python.org>
<http://bugs.python.org/issue8996>
_______________________________________


More information about the New-bugs-announce mailing list