diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2015-06-15 00:35:37 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2015-06-15 00:35:37 (GMT) |
commit | b4760efbadb1a780719bb62398949d5d6ef0605e (patch) | |
tree | d90781545f69d66cd3e7395b9926e2af459f2f56 /Doc/howto | |
parent | 1c90670bc2eaf55517b85d99d206d328a714b828 (diff) | |
download | cpython-b4760efbadb1a780719bb62398949d5d6ef0605e.zip cpython-b4760efbadb1a780719bb62398949d5d6ef0605e.tar.gz cpython-b4760efbadb1a780719bb62398949d5d6ef0605e.tar.bz2 |
Back porting changeset db302b88fdb6 to 3.4 branch, which fixed multiple documentation typos.
Related Issues:
#issue21528
#issue24453
Diffstat (limited to 'Doc/howto')
-rw-r--r-- | Doc/howto/clinic.rst | 8 | ||||
-rw-r--r-- | Doc/howto/regex.rst | 2 | ||||
-rw-r--r-- | Doc/howto/sockets.rst | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/Doc/howto/clinic.rst b/Doc/howto/clinic.rst index 0b7cada..e362631 100644 --- a/Doc/howto/clinic.rst +++ b/Doc/howto/clinic.rst @@ -886,7 +886,7 @@ Argument Clinic generates code that does it for you (in the parsing function). Advanced converters ------------------- -Remeber those format units you skipped for your first +Remember those format units you skipped for your first time because they were advanced? Here's how to handle those too. The trick is, all those format units take arguments--either @@ -1020,12 +1020,12 @@ any of the default arguments you can omit the parentheses. the ``"as"`` should come before the return converter.) There's one additional complication when using return converters: how do you -indicate an error has occured? Normally, a function returns a valid (non-``NULL``) +indicate an error has occurred? Normally, a function returns a valid (non-``NULL``) pointer for success, and ``NULL`` for failure. But if you use an integer return converter, all integers are valid. How can Argument Clinic detect an error? Its solution: each return converter implicitly looks for a special value that indicates an error. If you return that value, and an error has been set (``PyErr_Occurred()`` returns a true -value), then the generated code will propogate the error. Otherwise it will +value), then the generated code will propagate the error. Otherwise it will encode the value you return like normal. Currently Argument Clinic supports only a few return converters:: @@ -1573,7 +1573,7 @@ The fourth new directive is ``set``:: ``line_prefix`` is a string that will be prepended to every line of Clinic's output; ``line_suffix`` is a string that will be appended to every line of Clinic's output. -Both of these suport two format strings: +Both of these support two format strings: ``{block comment start}`` Turns into the string ``/*``, the start-comment text sequence for C files. diff --git a/Doc/howto/regex.rst b/Doc/howto/regex.rst index fbe763b..9ae04d7 100644 --- a/Doc/howto/regex.rst +++ b/Doc/howto/regex.rst @@ -852,7 +852,7 @@ keep track of the group numbers. There are two features which help with this problem. Both of them use a common syntax for regular expression extensions, so we'll look at that first. -Perl 5 is well-known for its powerful additions to standard regular expressions. +Perl 5 is well known for its powerful additions to standard regular expressions. For these new features the Perl developers couldn't choose new single-keystroke metacharacters or new special sequences beginning with ``\`` without making Perl's regular expressions confusingly different from standard REs. If they chose ``&`` as a diff --git a/Doc/howto/sockets.rst b/Doc/howto/sockets.rst index d5aff90..04394d4 100644 --- a/Doc/howto/sockets.rst +++ b/Doc/howto/sockets.rst @@ -234,7 +234,7 @@ messages to be sent back to back (without some kind of reply), and you pass following message. You'll need to put that aside and hold onto it, until it's needed. -Prefixing the message with it's length (say, as 5 numeric characters) gets more +Prefixing the message with its length (say, as 5 numeric characters) gets more complex, because (believe it or not), you may not get all 5 characters in one ``recv``. In playing around, you'll get away with it; but in high network loads, your code will very quickly break unless you use two ``recv`` loops - the first |