Skip to content

Commit def7be0

Browse files
author
Guido van Rossum
committed
Fix footnotes (pep2html can't handle 10+ auto-numbered footnotes), add a mypy link.
1 parent c735076 commit def7be0

File tree

1 file changed

+36
-28
lines changed

1 file changed

+36
-28
lines changed

pep-NNNN.txt

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ Abstract
1818
This PEP introduces a standard syntax for type hints using annotations
1919
on function definitions.
2020

21+
The proposal is strongly inspired by mypy [mypy]_.
22+
2123

2224
Rationale and Goals
2325
===================
2426

25-
PEP 3107 [#pep-3107]_ added support for arbitrary annotations on parts
27+
PEP 3107 [pep-3107]_ added support for arbitrary annotations on parts
2628
of a function definition. Although no meaning was assigned to
2729
annotations then, there has always been an implicit goal to use them
2830
for type hinting, which is listed as the first possible use case in
@@ -311,8 +313,8 @@ Usage Patterns
311313

312314
The main use case of type hinting is static analysis using an external
313315
tool without executing the analyzed program. Existing tools used for
314-
that purpose like ``pyflakes`` [#pyflakes]_ or ``pylint`` [#pylint]_
315-
might be extended to support type checking. New tools, like MyPy's
316+
that purpose like ``pyflakes`` [pyflakes]_ or ``pylint`` [pylint]_
317+
might be extended to support type checking. New tools, like mypy's
316318
``mypy -S`` mode, can be adopted specifically for this purpose.
317319

318320
Type checking based on type hints is understood as a best-effort
@@ -337,14 +339,14 @@ Existing Approaches in Python
337339
Cython and Numba
338340
----------------
339341

340-
Numba [#numba]_ is a *just-in-time* specializing compiler producing
342+
Numba [numba]_ is a *just-in-time* specializing compiler producing
341343
optimized native code from annotated Python and NumPy code.
342344

343345
obiwan
344346
------
345347

346-
obiwan [#obiwan]_ is a library enabling runtime type checking inspired
347-
by TypeScript [#typescript]_ (see `Existing Approaches in Other
348+
obiwan [obiwan]_ is a library enabling runtime type checking inspired
349+
by TypeScript [typescript]_ (see `Existing Approaches in Other
348350
Languages <#typescript>`_). The syntax leverages function annotations,
349351
extending it to validate callback functions, elements of dictionaries
350352
and lists. Type checkers might be functions, in which case a type is
@@ -364,7 +366,7 @@ Examples::
364366
pytypedecl
365367
----------
366368

367-
pytypedecl [#pytypedecl]_ consists of a type declaration language for
369+
pytypedecl [pytypedecl]_ consists of a type declaration language for
368370
Python and an optional runtime type checker. Type declarations for
369371
``module.py`` are kept in a separate file called ``module.pytd``. This
370372
solves issues with declaration ordering.
@@ -385,7 +387,7 @@ Example::
385387
Argument Clinic
386388
---------------
387389

388-
Argument Clinic [#argumentclinic]_ is a preprocessor for CPython
390+
Argument Clinic [argumentclinic]_ is a preprocessor for CPython
389391
C files, automating maintenance of argument parsing code for “builtins”.
390392

391393
Example argument declaration::
@@ -418,7 +420,7 @@ Example argument declaration::
418420
NumPy
419421
-----
420422

421-
NumPy [#numpy]_ is an extension to Python adding support for
423+
NumPy [numpy]_ is an extension to Python adding support for
422424
multi-dimensional arrays, matrices and operations to operate on those.
423425

424426
The project requires typing information in the API documentation. There
@@ -457,7 +459,7 @@ Existing Approaches in Other Languages
457459
ActionScript
458460
------------
459461

460-
ActionScript [#actionscript]_ is a class-based, single inheritance,
462+
ActionScript [actionscript]_ is a class-based, single inheritance,
461463
object-oriented superset of ECMAScript. It supports inferfaces and
462464
strong runtime-checked static typing. Compilation supports a “strict
463465
dialect” where type mismatches are reported at compile-time.
@@ -489,7 +491,7 @@ Example code with types::
489491
Dart
490492
----
491493

492-
Dart [#dart]_ is a class-based, single inheritance, object-oriented
494+
Dart [dart]_ is a class-based, single inheritance, object-oriented
493495
language with C-style syntax. It supports interfaces, abstract classes,
494496
reified generics, and optional typing.
495497

@@ -515,7 +517,7 @@ Example code with types::
515517
Hack
516518
----
517519

518-
Hack [#hack]_ is a programming language that interoperates seamlessly
520+
Hack [hack]_ is a programming language that interoperates seamlessly
519521
with PHP. It provides opt-in static type checking, type aliasing,
520522
generics, nullable types, and lambdas.
521523

@@ -542,7 +544,7 @@ Example code with types::
542544
TypeScript
543545
----------
544546

545-
TypeScript [#typescript]_ is a typed superset of JavaScript that adds
547+
TypeScript [typescript]_ is a typed superset of JavaScript that adds
546548
interfaces, classes, mixins and modules to the language.
547549

548550
Type checks are duck typed. Multiple valid function signatures are
@@ -623,39 +625,45 @@ the toggle for runtime checks.
623625
References
624626
==========
625627

626-
.. [#pep-3107]
628+
.. [pep-3107]
627629
http://www.python.org/dev/peps/pep-3107/
628630

629-
.. [#mypy]
630-
https://github.com/JukkaL/mypy
631+
.. [mypy]
632+
http://mypy-lang.org
631633

632-
.. [#obiwan]
634+
.. [obiwan]
633635
http://pypi.python.org/pypi/obiwan
634636

635-
.. [#numba]
637+
.. [numba]
636638
http://numba.pydata.org
637639

638-
.. [#pytypedecl]
640+
.. [pytypedecl]
639641
https://github.com/google/pytypedecl
640642

641-
.. [#argumentclinic]
643+
.. [argumentclinic]
642644
https://docs.python.org/3/howto/clinic.html
643645

644-
.. [#numpy]
646+
.. [numpy]
645647
http://www.numpy.org
646648

647-
.. [#typescript]
648-
http://www.typescriptlang.org/
649+
.. [typescript]
650+
http://www.typescriptlang.org
649651

650-
.. [#hack]
651-
http://hacklang.org/
652+
.. [hack]
653+
http://hacklang.org
652654

653-
.. [#dart]
654-
https://www.dartlang.org/
655+
.. [dart]
656+
https://www.dartlang.org
655657

656-
.. [#actionscript]
658+
.. [actionscript]
657659
http://livedocs.adobe.com/specs/actionscript/3/
658660

661+
.. [pyflakes]
662+
https://github.com/pyflakes/pyflakes/
663+
664+
.. [pylint]
665+
http://www.pylint.org
666+
659667

660668
Copyright
661669
=========

0 commit comments

Comments
 (0)