[Python-ideas] Proposal: Use mypy syntax for function annotations

Ben Finney ben+python at benfinney.id.au
Thu Aug 14 21:48:50 CEST 2014


Steven D'Aprano <steve at pearwood.info> writes:

> On Wed, Aug 13, 2014 at 10:29:48PM +0200, Christian Heimes wrote:
>
> > 1) I'm not keen with the naming of mypy's typing classes. The visual
> > distinction between e.g. dict() and Dict() is too small and IMHO
> > confusing for newcomers. […]
>
> Would it be possible, and desirable, to modify the built-in types so
> that we could re-use them in the type annotations?

That would address my concern. With that change, when the programmer who
reads the code encounters mention of a type, it means precisely the same
type object as it appears to be and not some special beast.

-- 
 \      “Science embraces facts and debates opinion; religion embraces |
  `\    opinion and debates the facts.” —Tom Heehler, _The Well-Spoken |
_o__)                                                       Thesaurus_ |
Ben Finney



More information about the Python-ideas mailing list