Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
1ed2e69a
Commit
1ed2e69a
authored
Oct 19, 2014
by
Berker Peksag
Browse files
Options
Browse Files
Download
Plain Diff
Issue #22186: Fix typos in Lib/.
Patch by Févry Thibault.
parents
8c06ac5e
f23530f5
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
16 additions
and
16 deletions
+16
-16
Lib/heapq.py
Lib/heapq.py
+1
-1
Lib/idlelib/idle_test/htest.py
Lib/idlelib/idle_test/htest.py
+1
-1
Lib/idlelib/idle_test/mock_tk.py
Lib/idlelib/idle_test/mock_tk.py
+1
-1
Lib/idlelib/idle_test/test_autoexpand.py
Lib/idlelib/idle_test/test_autoexpand.py
+1
-1
Lib/inspect.py
Lib/inspect.py
+1
-1
Lib/ipaddress.py
Lib/ipaddress.py
+1
-1
Lib/lib2to3/tests/test_parser.py
Lib/lib2to3/tests/test_parser.py
+1
-1
Lib/pdb.py
Lib/pdb.py
+1
-1
Lib/poplib.py
Lib/poplib.py
+1
-1
Lib/socketserver.py
Lib/socketserver.py
+1
-1
Lib/ssl.py
Lib/ssl.py
+1
-1
Lib/test/test_asyncio/test_base_events.py
Lib/test/test_asyncio/test_base_events.py
+1
-1
Lib/unittest/test/test_case.py
Lib/unittest/test/test_case.py
+1
-1
Tools/clinic/clinic.py
Tools/clinic/clinic.py
+3
-3
No files found.
Lib/heapq.py
View file @
1ed2e69a
...
@@ -429,7 +429,7 @@ def merge(*iterables, key=None, reverse=False):
...
@@ -429,7 +429,7 @@ def merge(*iterables, key=None, reverse=False):
# value seen being in the 100 most extreme values is 100/101.
# value seen being in the 100 most extreme values is 100/101.
# * If the value is a new extreme value, the cost of inserting it into the
# * If the value is a new extreme value, the cost of inserting it into the
# heap is 1 + log(k, 2).
# heap is 1 + log(k, 2).
# * The probabilty times the cost gives:
# * The probabil
i
ty times the cost gives:
# (k/i) * (1 + log(k, 2))
# (k/i) * (1 + log(k, 2))
# * Summing across the remaining n-k elements gives:
# * Summing across the remaining n-k elements gives:
# sum((k/i) * (1 + log(k, 2)) for i in range(k+1, n+1))
# sum((k/i) * (1 + log(k, 2)) for i in range(k+1, n+1))
...
...
Lib/idlelib/idle_test/htest.py
View file @
1ed2e69a
...
@@ -171,7 +171,7 @@ GetKeysDialog_spec = {
...
@@ -171,7 +171,7 @@ GetKeysDialog_spec = {
"<nothing> is invalid.
\
n
"
"<nothing> is invalid.
\
n
"
"No modifier key is invalid.
\
n
"
"No modifier key is invalid.
\
n
"
"Shift key with [a-z],[0-9], function key, move key, tab, space"
"Shift key with [a-z],[0-9], function key, move key, tab, space"
"is invalid.
\
n
No validit
it
y checking if advanced key binding "
"is invalid.
\
n
No validity checking if advanced key binding "
"entry is used."
"entry is used."
}
}
...
...
Lib/idlelib/idle_test/mock_tk.py
View file @
1ed2e69a
...
@@ -116,7 +116,7 @@ class Text:
...
@@ -116,7 +116,7 @@ class Text:
"""Return a (line, char) tuple of int indexes into self.data.
"""Return a (line, char) tuple of int indexes into self.data.
This implements .index without converting the result back to a string.
This implements .index without converting the result back to a string.
The result is contrained by the number of lines and linelengths of
The result is con
s
trained by the number of lines and linelengths of
self.data. For many indexes, the result is initially (1, 0).
self.data. For many indexes, the result is initially (1, 0).
The input index may have any of several possible forms:
The input index may have any of several possible forms:
...
...
Lib/idlelib/idle_test/test_autoexpand.py
View file @
1ed2e69a
...
@@ -78,7 +78,7 @@ class AutoExpandTest(unittest.TestCase):
...
@@ -78,7 +78,7 @@ class AutoExpandTest(unittest.TestCase):
equal
(
previous
(),
'a'
)
equal
(
previous
(),
'a'
)
def
test_after_only
(
self
):
def
test_after_only
(
self
):
# Also add punctuation 'noise' that shoud be ignored.
# Also add punctuation 'noise' that shou
l
d be ignored.
text
=
self
.
text
text
=
self
.
text
previous
=
self
.
auto_expand
.
getprevword
previous
=
self
.
auto_expand
.
getprevword
expand
=
self
.
auto_expand
.
expand_word_event
expand
=
self
.
auto_expand
.
expand_word_event
...
...
Lib/inspect.py
View file @
1ed2e69a
...
@@ -50,7 +50,7 @@ from collections import namedtuple, OrderedDict
...
@@ -50,7 +50,7 @@ from collections import namedtuple, OrderedDict
# Create constants for the compiler flags in Include/code.h
# Create constants for the compiler flags in Include/code.h
# We try to get them from dis to avoid duplication, but fall
# We try to get them from dis to avoid duplication, but fall
# back to hardcoding so the dependency is optional
# back to hard
-
coding so the dependency is optional
try
:
try
:
from
dis
import
COMPILER_FLAG_NAMES
as
_flag_names
from
dis
import
COMPILER_FLAG_NAMES
as
_flag_names
except
ImportError
:
except
ImportError
:
...
...
Lib/ipaddress.py
View file @
1ed2e69a
...
@@ -479,7 +479,7 @@ class _IPAddressBase(_TotalOrderingMixin):
...
@@ -479,7 +479,7 @@ class _IPAddressBase(_TotalOrderingMixin):
"""Return prefix length from the bitwise netmask.
"""Return prefix length from the bitwise netmask.
Args:
Args:
ip_int: An integer, the netmask in
a
xpanded bitwise format
ip_int: An integer, the netmask in
e
xpanded bitwise format
Returns:
Returns:
An integer, the prefix length.
An integer, the prefix length.
...
...
Lib/lib2to3/tests/test_parser.py
View file @
1ed2e69a
...
@@ -90,7 +90,7 @@ class TestRaiseChanges(GrammarTest):
...
@@ -90,7 +90,7 @@ class TestRaiseChanges(GrammarTest):
self
.
invalid_syntax
(
"raise E from"
)
self
.
invalid_syntax
(
"raise E from"
)
# Adapt
at
ed from Python 3's Lib/test/test_grammar.py:GrammarTests.testFuncdef
# Adapted from Python 3's Lib/test/test_grammar.py:GrammarTests.testFuncdef
class
TestFunctionAnnotations
(
GrammarTest
):
class
TestFunctionAnnotations
(
GrammarTest
):
def
test_1
(
self
):
def
test_1
(
self
):
self
.
validate
(
"""def f(x) -> list: pass"""
)
self
.
validate
(
"""def f(x) -> list: pass"""
)
...
...
Lib/pdb.py
View file @
1ed2e69a
...
@@ -301,7 +301,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
...
@@ -301,7 +301,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
# An 'Internal StopIteration' exception is an exception debug event
# An 'Internal StopIteration' exception is an exception debug event
# issued by the interpreter when handling a subgenerator run with
# issued by the interpreter when handling a subgenerator run with
# 'yield from' or a generator controled by a for loop. No exception has
# 'yield from' or a generator controled by a for loop. No exception has
# actually occured in this case. The debugger uses this debug event to
# actually occur
r
ed in this case. The debugger uses this debug event to
# stop when the debuggee is returning from such generators.
# stop when the debuggee is returning from such generators.
prefix
=
'Internal '
if
(
not
exc_traceback
prefix
=
'Internal '
if
(
not
exc_traceback
and
exc_type
is
StopIteration
)
else
''
and
exc_type
is
StopIteration
)
else
''
...
...
Lib/poplib.py
View file @
1ed2e69a
...
@@ -41,7 +41,7 @@ LF = b'\n'
...
@@ -41,7 +41,7 @@ LF = b'\n'
CRLF
=
CR
+
LF
CRLF
=
CR
+
LF
# maximal line length when calling readline(). This is to prevent
# maximal line length when calling readline(). This is to prevent
# reading arbitrary leng
ht
lines. RFC 1939 limits POP3 line length to
# reading arbitrary leng
th
lines. RFC 1939 limits POP3 line length to
# 512 characters, including CRLF. We have selected 2048 just to be on
# 512 characters, including CRLF. We have selected 2048 just to be on
# the safe side.
# the safe side.
_MAXLINE
=
2048
_MAXLINE
=
2048
...
...
Lib/socketserver.py
View file @
1ed2e69a
...
@@ -288,7 +288,7 @@ class BaseServer:
...
@@ -288,7 +288,7 @@ class BaseServer:
deadline
=
time
()
+
timeout
deadline
=
time
()
+
timeout
# Wait until a request arrives or the timeout expires - the loop is
# Wait until a request arrives or the timeout expires - the loop is
# necessary to accomodate early wakeups due to EINTR.
# necessary to accom
m
odate early wakeups due to EINTR.
with
_ServerSelector
()
as
selector
:
with
_ServerSelector
()
as
selector
:
selector
.
register
(
self
,
selectors
.
EVENT_READ
)
selector
.
register
(
self
,
selectors
.
EVENT_READ
)
...
...
Lib/ssl.py
View file @
1ed2e69a
...
@@ -202,7 +202,7 @@ def _dnsname_match(dn, hostname, max_wildcards=1):
...
@@ -202,7 +202,7 @@ def _dnsname_match(dn, hostname, max_wildcards=1):
wildcards
=
leftmost
.
count
(
'*'
)
wildcards
=
leftmost
.
count
(
'*'
)
if
wildcards
>
max_wildcards
:
if
wildcards
>
max_wildcards
:
# Issue #17980: avoid denials of service by refusing more
# Issue #17980: avoid denials of service by refusing more
# than one wildcard per fragment. A surve
r
y of established
# than one wildcard per fragment. A survey of established
# policy among SSL implementations showed it to be a
# policy among SSL implementations showed it to be a
# reasonable choice.
# reasonable choice.
raise
CertificateError
(
raise
CertificateError
(
...
...
Lib/test/test_asyncio/test_base_events.py
View file @
1ed2e69a
...
@@ -371,7 +371,7 @@ class BaseEventLoopTests(test_utils.TestCase):
...
@@ -371,7 +371,7 @@ class BaseEventLoopTests(test_utils.TestCase):
self
.
loop
.
run_until_complete
,
self
.
loop
.
subprocess_exec
,
self
.
loop
.
run_until_complete
,
self
.
loop
.
subprocess_exec
,
asyncio
.
SubprocessProtocol
)
asyncio
.
SubprocessProtocol
)
# ex
e
pected multiple arguments, not a list
# expected multiple arguments, not a list
self
.
assertRaises
(
TypeError
,
self
.
assertRaises
(
TypeError
,
self
.
loop
.
run_until_complete
,
self
.
loop
.
subprocess_exec
,
self
.
loop
.
run_until_complete
,
self
.
loop
.
subprocess_exec
,
asyncio
.
SubprocessProtocol
,
args
)
asyncio
.
SubprocessProtocol
,
args
)
...
...
Lib/unittest/test/test_case.py
View file @
1ed2e69a
...
@@ -1349,7 +1349,7 @@ test case
...
@@ -1349,7 +1349,7 @@ test case
self
.
checkAssertLogsPerLevel
(
'ERROR'
)
self
.
checkAssertLogsPerLevel
(
'ERROR'
)
def
checkAssertLogsPerLogger
(
self
,
logger
):
def
checkAssertLogsPerLogger
(
self
,
logger
):
# Check per-logger fitering
# Check per-logger fi
l
tering
with
self
.
assertNoStderr
():
with
self
.
assertNoStderr
():
with
self
.
assertLogs
(
level
=
'DEBUG'
)
as
outer_cm
:
with
self
.
assertLogs
(
level
=
'DEBUG'
)
as
outer_cm
:
with
self
.
assertLogs
(
logger
,
level
=
'DEBUG'
)
as
cm
:
with
self
.
assertLogs
(
logger
,
level
=
'DEBUG'
)
as
cm
:
...
...
Tools/clinic/clinic.py
View file @
1ed2e69a
...
@@ -1015,7 +1015,7 @@ class CLanguage(Language):
...
@@ -1015,7 +1015,7 @@ class CLanguage(Language):
# when we're METH_O, but have a custom return converter,
# when we're METH_O, but have a custom return converter,
# we use "impl_parameters" for the parsing function
# we use "impl_parameters" for the parsing function
# because that works better. but that means we must
# because that works better. but that means we must
# supress actually declaring the impl's parameters
# sup
p
ress actually declaring the impl's parameters
# as variables in the parsing function. but since it's
# as variables in the parsing function. but since it's
# METH_O, we have exactly one anyway, so we know exactly
# METH_O, we have exactly one anyway, so we know exactly
# where it is.
# where it is.
...
@@ -3734,7 +3734,7 @@ class DSLParser:
...
@@ -3734,7 +3734,7 @@ class DSLParser:
if
self
.
keyword_only
:
if
self
.
keyword_only
:
fail
(
"Function "
+
self
.
function
.
name
+
" mixes keyword-only and positional-only parameters, which is unsupported."
)
fail
(
"Function "
+
self
.
function
.
name
+
" mixes keyword-only and positional-only parameters, which is unsupported."
)
self
.
parameter_state
=
self
.
ps_seen_slash
self
.
parameter_state
=
self
.
ps_seen_slash
# fixup prece
e
ding parameters
# fixup preceding parameters
for
p
in
self
.
function
.
parameters
.
values
():
for
p
in
self
.
function
.
parameters
.
values
():
if
(
p
.
kind
!=
inspect
.
Parameter
.
POSITIONAL_OR_KEYWORD
and
not
isinstance
(
p
.
converter
,
self_converter
)):
if
(
p
.
kind
!=
inspect
.
Parameter
.
POSITIONAL_OR_KEYWORD
and
not
isinstance
(
p
.
converter
,
self_converter
)):
fail
(
"Function "
+
self
.
function
.
name
+
" mixes keyword-only and positional-only parameters, which is unsupported."
)
fail
(
"Function "
+
self
.
function
.
name
+
" mixes keyword-only and positional-only parameters, which is unsupported."
)
...
@@ -3930,7 +3930,7 @@ class DSLParser:
...
@@ -3930,7 +3930,7 @@ class DSLParser:
# for __init__. (it can't be, __init__ doesn't
# for __init__. (it can't be, __init__ doesn't
# have a docstring.) if this is an __init__
# have a docstring.) if this is an __init__
# (or __new__), then this signature is for
# (or __new__), then this signature is for
# calling the class to contruct a new instance.
# calling the class to con
s
truct a new instance.
p_add
(
'$'
)
p_add
(
'$'
)
name
=
p
.
converter
.
signature_name
or
p
.
name
name
=
p
.
converter
.
signature_name
or
p
.
name
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment