[Python-checkins] r53152 - peps/trunk/pep-3107.txt
neal.norwitz
python-checkins at python.org
Sat Dec 23 07:10:02 CET 2006
Author: neal.norwitz
Date: Sat Dec 23 07:10:01 2006
New Revision: 53152
Modified:
peps/trunk/pep-3107.txt
Log:
Fix some minor typos/formatting
Modified: peps/trunk/pep-3107.txt
==============================================================================
--- peps/trunk/pep-3107.txt (original)
+++ peps/trunk/pep-3107.txt Sat Dec 23 07:10:01 2006
@@ -25,7 +25,7 @@
Because Python's 2.x series lacks a standard way of annotating a
function's parameters and return values (e.g., with information about
-a what type a function's return value should be), a variety of tools
+what type a function's return value should be), a variety of tools
and libraries have appeared to fill this gap [#tailexamp]_. Some
utilise the decorators introduced in "PEP 318", while others parse a
function's docstring, looking for annotations there.
@@ -69,14 +69,14 @@
Another library might be used to provide typechecking for Python
functions and methods. This library could use annotations to
indicate the function's expected input and return types, possibly
- something like ::
+ something like::
def haul(item: Haulable, *vargs: PackAnimal) -> Distance:
...
However, neither the strings in the first example nor the
type information in the second example have any meaning on their
- own; meaning comes from third-party libraries alone.
+ own; meaning comes from third-party libraries alone.
3. Following from point 2, this PEP makes no attempt to introduce
any kind of standard semantics, even for the built-in types.
@@ -99,7 +99,7 @@
Annotations for parameters take the form of optional expressions that
follow the parameter name. This example indicates that parameters 'a'
-and 'c' should both be a ``Number``, while parameter 'b' should both
+and 'c' should both be a ``Number``, while parameter 'b' should
be a ``Mapping``::
def foo(a: Number, b: Mapping, c: Number = 5):
@@ -149,8 +149,7 @@
Python expression. Like the annotations for parameters, this
expression will be evaluated when the function definition is executed.
-The grammar for function definitions [#grammar]_ is now something like
-::
+The grammar for function definitions [#grammar]_ is now something like::
funcdef ::= [decorators] "def" funcname "("
[parameter_list] ")" ["->" expression] ":" suite
More information about the Python-checkins
mailing list