Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fe5f409

Browse files
committed
Recorded merge of revisions 72830 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r72830 | georg.brandl | 2009-05-22 12:40:00 +0200 (Fr, 22 Mai 2009) | 1 line #6086: fix spelling and use a better exception to catch. ........
1 parent 4f6da63 commit fe5f409

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

Doc/howto/doanddont.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Inside Function Definitions
3030

3131
``from module import *`` is *invalid* inside function definitions. While many
3232
versions of Python do not check for the invalidity, it does not make it more
33-
valid, no more then having a smart lawyer makes a man innocent. Do not use it
33+
valid, no more than having a smart lawyer makes a man innocent. Do not use it
3434
like that ever. Even in versions where it was accepted, it made the function
3535
execution slower, because the compiler could not be certain which names are
3636
local and which are global. In Python 2.1 this construct causes warnings, and
@@ -78,7 +78,7 @@ There are situations in which ``from module import *`` is just fine:
7878
from module import name1, name2
7979
-------------------------------
8080

81-
This is a "don't" which is much weaker then the previous "don't"s but is still
81+
This is a "don't" which is much weaker than the previous "don't"s but is still
8282
something you should not do if you don't have good reasons to do that. The
8383
reason it is usually bad idea is because you suddenly have an object which lives
8484
in two separate namespaces. When the binding in one namespace changes, the
@@ -212,11 +212,11 @@ Using the Batteries
212212
Every so often, people seem to be writing stuff in the Python library again,
213213
usually poorly. While the occasional module has a poor interface, it is usually
214214
much better to use the rich standard library and data types that come with
215-
Python then inventing your own.
215+
Python than inventing your own.
216216

217217
A useful module very few people know about is :mod:`os.path`. It always has the
218218
correct path arithmetic for your operating system, and will usually be much
219-
better then whatever you come up with yourself.
219+
better than whatever you come up with yourself.
220220

221221
Compare::
222222

@@ -252,7 +252,7 @@ Using Backslash to Continue Statements
252252
======================================
253253

254254
Since Python treats a newline as a statement terminator, and since statements
255-
are often more then is comfortable to put in one line, many people do::
255+
are often more than is comfortable to put in one line, many people do::
256256

257257
if foo.bar()['first'][0] == baz.quux(1, 2)[5:9] and \
258258
calculate_number(10, 20) != forbulate(500, 360):

Doc/howto/urllib2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ geturl, and info, methods as returned by the ``urllib.response`` module::
313313
>>> req = urllib.request.Request('http://www.python.org/fish.html')
314314
>>> try:
315315
>>> urllib.request.urlopen(req)
316-
>>> except urllib.error.URLError as e:
316+
>>> except urllib.error.HTTPError as e:
317317
>>> print(e.code)
318318
>>> print(e.read())
319319
>>>

0 commit comments

Comments
 (0)