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
25ecfd00
Commit
25ecfd00
authored
Jul 28, 2016
by
Martin Panter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #27626: Spelling fixes in docs, comments and internal names
Based on patch by Ville Skyttä.
parent
7e394cae
Changes
33
Show whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
48 additions
and
48 deletions
+48
-48
Doc/howto/clinic.rst
Doc/howto/clinic.rst
+1
-1
Doc/howto/sockets.rst
Doc/howto/sockets.rst
+1
-1
Doc/library/configparser.rst
Doc/library/configparser.rst
+1
-1
Doc/library/importlib.rst
Doc/library/importlib.rst
+1
-1
Doc/library/os.rst
Doc/library/os.rst
+1
-1
Doc/library/socket.rst
Doc/library/socket.rst
+1
-1
Include/longobject.h
Include/longobject.h
+1
-1
Lib/ctypes/test/test_numbers.py
Lib/ctypes/test/test_numbers.py
+1
-1
Lib/ctypes/test/test_structures.py
Lib/ctypes/test/test_structures.py
+1
-1
Lib/datetime.py
Lib/datetime.py
+1
-1
Lib/idlelib/CallTipWindow.py
Lib/idlelib/CallTipWindow.py
+1
-1
Lib/idlelib/ParenMatch.py
Lib/idlelib/ParenMatch.py
+1
-1
Lib/platform.py
Lib/platform.py
+1
-1
Lib/shutil.py
Lib/shutil.py
+1
-1
Lib/test/eintrdata/eintr_tester.py
Lib/test/eintrdata/eintr_tester.py
+1
-1
Lib/test/test_collections.py
Lib/test/test_collections.py
+1
-1
Lib/test/test_deque.py
Lib/test/test_deque.py
+1
-1
Lib/test/test_enum.py
Lib/test/test_enum.py
+10
-10
Lib/test/test_http_cookiejar.py
Lib/test/test_http_cookiejar.py
+1
-1
Lib/test/test_math.py
Lib/test/test_math.py
+2
-2
Lib/test/test_nntplib.py
Lib/test/test_nntplib.py
+2
-2
Lib/test/test_shutil.py
Lib/test/test_shutil.py
+1
-1
Lib/test/test_structseq.py
Lib/test/test_structseq.py
+1
-1
Lib/test/test_subprocess.py
Lib/test/test_subprocess.py
+1
-1
Lib/unittest/case.py
Lib/unittest/case.py
+2
-2
Misc/NEWS
Misc/NEWS
+1
-1
Modules/_ctypes/_ctypes.c
Modules/_ctypes/_ctypes.c
+1
-1
Modules/itertoolsmodule.c
Modules/itertoolsmodule.c
+1
-1
Objects/exceptions.c
Objects/exceptions.c
+3
-3
Objects/longobject.c
Objects/longobject.c
+2
-2
Tools/clinic/clinic_test.py
Tools/clinic/clinic_test.py
+1
-1
Tools/demo/redemo.py
Tools/demo/redemo.py
+1
-1
Tools/freeze/freeze.py
Tools/freeze/freeze.py
+1
-1
No files found.
Doc/howto/clinic.rst
View file @
25ecfd00
...
...
@@ -1583,7 +1583,7 @@ called ``preserve``::
preserve
This tells Clinic that the current contents of the output should be kept, unmodifed.
This tells Clinic that the current contents of the output should be kept, unmodif
i
ed.
This is used internally by Clinic when dumping output into ``file`` files; wrapping
it in a Clinic block lets Clinic use its existing checksum functionality to ensure
the file was not modified by hand before it gets overwritten.
...
...
Doc/howto/sockets.rst
View file @
25ecfd00
...
...
@@ -106,7 +106,7 @@ mainloop of the web server::
There's actually 3 general ways in which this loop could work - dispatching a
thread to handle ``clientsocket``, create a new process to handle
``clientsocket``, or restructure this app to use non-blocking sockets, and
mul
it
plex between our "server" socket and any active ``clientsocket``\ s using
mul
ti
plex between our "server" socket and any active ``clientsocket``\ s using
``select``. More about that later. The important thing to understand now is
this: this is *all* a "server" socket does. It doesn't send any data. It doesn't
receive any data. It just produces "client" sockets. Each ``clientsocket`` is
...
...
Doc/library/configparser.rst
View file @
25ecfd00
...
...
@@ -66,7 +66,7 @@ The structure of INI files is described `in the following section
<#supported-ini-file-structure>`_. Essentially, the file
consists of sections, each of which contains keys with values.
:mod:`configparser` classes can read and write such files. Let's start by
creating the above configuration file programatically.
creating the above configuration file program
m
atically.
.. doctest::
...
...
Doc/library/importlib.rst
View file @
25ecfd00
...
...
@@ -629,7 +629,7 @@ ABC hierarchy::
.. method:: path_stats(path)
Optional abstract method which returns a :class:`dict` containing
metadata about the specifed path. Supported dictionary keys are:
metadata about the specif
i
ed path. Supported dictionary keys are:
- ``'
mtime
'`` (mandatory): an integer or floating-point number
representing the modification time of the source code;
...
...
Doc/library/os.rst
View file @
25ecfd00
...
...
@@ -1900,7 +1900,7 @@ features:
On Unix, *path* can be of type :class:`str` or :class:`bytes` (use
:func:`~os.fsencode` and :func:`~os.fsdecode` to encode and decode
:class:`bytes` paths). On Windows, *path* must be of type :class:`str`.
On both sytems, the type of the :attr:`~DirEntry.name` and
On both sy
s
tems, the type of the :attr:`~DirEntry.name` and
:attr:`~DirEntry.path` attributes of each :class:`DirEntry` will be of
the same type as *path*.
...
...
Doc/library/socket.rst
View file @
25ecfd00
...
...
@@ -1211,7 +1211,7 @@ to sockets.
much data, if any, was successfully sent.
.. versionchanged:: 3.5
The socket timeout is no more reset each time data is sent successfuly.
The socket timeout is no more reset each time data is sent successful
l
y.
The socket timeout is now the maximum total duration to send all data.
.. versionchanged:: 3.5
...
...
Include/longobject.h
View file @
25ecfd00
...
...
@@ -159,7 +159,7 @@ PyAPI_FUNC(PyObject *) _PyLong_FromByteArray(
example, if is_signed is 0 and there are more digits in the v than
fit in n; or if is_signed is 1, v < 0, and n is just 1 bit shy of
being large enough to hold a sign bit. OverflowError is set in this
case, but bytes holds the least-signficant n bytes of the true value.
case, but bytes holds the least-sign
i
ficant n bytes of the true value.
*/
PyAPI_FUNC
(
int
)
_PyLong_AsByteArray
(
PyLongObject
*
v
,
unsigned
char
*
bytes
,
size_t
n
,
...
...
Lib/ctypes/test/test_numbers.py
View file @
25ecfd00
...
...
@@ -76,7 +76,7 @@ class NumberTestCase(unittest.TestCase):
self
.
assertEqual
(
t
(
v
).
value
,
truth
(
v
))
def
test_typeerror
(
self
):
# Only numbers are allowed in the contructor,
# Only numbers are allowed in the con
s
tructor,
# otherwise TypeError is raised
for
t
in
signed_types
+
unsigned_types
+
float_types
:
self
.
assertRaises
(
TypeError
,
t
,
""
)
...
...
Lib/ctypes/test/test_structures.py
View file @
25ecfd00
...
...
@@ -106,7 +106,7 @@ class StructureTestCase(unittest.TestCase):
self
.
assertEqual
(
alignment
(
XX
),
alignment
(
X
))
self
.
assertEqual
(
sizeof
(
XX
),
calcsize
(
"3s 3s 0s"
))
def
test_em
tp
y
(
self
):
def
test_em
pt
y
(
self
):
# I had problems with these
#
# Although these are pathological cases: Empty Structures!
...
...
Lib/datetime.py
View file @
25ecfd00
...
...
@@ -706,7 +706,7 @@ class date:
@
classmethod
def
fromordinal
(
cls
,
n
):
"""Contruct a date from a proleptic Gregorian ordinal.
"""Con
s
truct a date from a proleptic Gregorian ordinal.
January 1 of year 1 is day 1. Only the year, month and day are
non-zero in the result.
...
...
Lib/idlelib/CallTipWindow.py
View file @
25ecfd00
...
...
@@ -9,7 +9,7 @@ HIDE_VIRTUAL_EVENT_NAME = "<<calltipwindow-hide>>"
HIDE_SEQUENCES
=
(
"<Key-Escape>"
,
"<FocusOut>"
)
CHECKHIDE_VIRTUAL_EVENT_NAME
=
"<<calltipwindow-checkhide>>"
CHECKHIDE_SEQUENCES
=
(
"<KeyRelease>"
,
"<ButtonRelease>"
)
CHECKHIDE_TIME
=
100
# miliseconds
CHECKHIDE_TIME
=
100
# mil
l
iseconds
MARK_RIGHT
=
"calltipwindowregion_right"
...
...
Lib/idlelib/ParenMatch.py
View file @
25ecfd00
...
...
@@ -9,7 +9,7 @@ from idlelib.HyperParser import HyperParser
from
idlelib.configHandler
import
idleConf
_openers
=
{
')'
:
'('
,
']'
:
'['
,
'}'
:
'{'
}
CHECK_DELAY
=
100
# miliseconds
CHECK_DELAY
=
100
# mil
l
iseconds
class
ParenMatch
:
"""Highlight matching parentheses
...
...
Lib/platform.py
View file @
25ecfd00
...
...
@@ -61,7 +61,7 @@
# though
# 0.5.2 - fixed uname() to return '' instead of 'unknown' in all
# return values (the system uname command tends to return
# 'unknown' instead of just leaving the field em
tp
y)
# 'unknown' instead of just leaving the field em
pt
y)
# 0.5.1 - included code for slackware dist; added exception handlers
# to cover up situations where platforms don't have os.popen
# (e.g. Mac) or fail on socket.gethostname(); fixed libc
...
...
Lib/shutil.py
View file @
25ecfd00
...
...
@@ -853,7 +853,7 @@ def register_unpack_format(name, extensions, function, extra_args=None,
_UNPACK_FORMATS
[
name
]
=
extensions
,
function
,
extra_args
,
description
def
unregister_unpack_format
(
name
):
"""Removes the pack format from the regist
e
ry."""
"""Removes the pack format from the registry."""
del
_UNPACK_FORMATS
[
name
]
def
_ensure_directory
(
path
):
...
...
Lib/test/eintrdata/eintr_tester.py
View file @
25ecfd00
...
...
@@ -372,7 +372,7 @@ class SignalEINTRTest(EINTRBaseTest):
@
unittest
.
skipUnless
(
hasattr
(
signal
,
'sigwaitinfo'
),
'need signal.sigwaitinfo()'
)
def
test_sigwaitinfo
(
self
):
# Issue #25277, #25868: give a few miliseconds to the parent process
# Issue #25277, #25868: give a few mil
l
iseconds to the parent process
# between os.write() and signal.sigwaitinfo() to works around a race
# condition
self
.
sleep_time
=
0.100
...
...
Lib/test/test_collections.py
View file @
25ecfd00
...
...
@@ -114,7 +114,7 @@ class TestChainMap(unittest.TestCase):
self
.
assertEqual
(
f
[
'b'
],
5
)
# find first in chain
self
.
assertEqual
(
f
.
parents
[
'b'
],
2
)
# look beyond maps[0]
def
test_contructor
(
self
):
def
test_con
s
tructor
(
self
):
self
.
assertEqual
(
ChainMap
().
maps
,
[{}])
# no-args --> one new dict
self
.
assertEqual
(
ChainMap
({
1
:
2
}).
maps
,
[{
1
:
2
}])
# 1 arg --> list
...
...
Lib/test/test_deque.py
View file @
25ecfd00
...
...
@@ -494,7 +494,7 @@ class TestBasic(unittest.TestCase):
d
.
clear
()
self
.
assertEqual
(
len
(
d
),
0
)
self
.
assertEqual
(
list
(
d
),
[])
d
.
clear
()
# clear an em
tp
y deque
d
.
clear
()
# clear an em
pt
y deque
self
.
assertEqual
(
list
(
d
),
[])
def
test_remove
(
self
):
...
...
Lib/test/test_enum.py
View file @
25ecfd00
...
...
@@ -654,7 +654,7 @@ class TestEnum(unittest.TestCase):
self
.
Season
.
SPRING
]
)
def
test_programatic_function_string
(
self
):
def
test_program
m
atic_function_string
(
self
):
SummerMonth
=
Enum
(
'SummerMonth'
,
'june july august'
)
lst
=
list
(
SummerMonth
)
self
.
assertEqual
(
len
(
lst
),
len
(
SummerMonth
))
...
...
@@ -671,7 +671,7 @@ class TestEnum(unittest.TestCase):
self
.
assertIn
(
e
,
SummerMonth
)
self
.
assertIs
(
type
(
e
),
SummerMonth
)
def
test_programatic_function_string_with_start
(
self
):
def
test_program
m
atic_function_string_with_start
(
self
):
SummerMonth
=
Enum
(
'SummerMonth'
,
'june july august'
,
start
=
10
)
lst
=
list
(
SummerMonth
)
self
.
assertEqual
(
len
(
lst
),
len
(
SummerMonth
))
...
...
@@ -688,7 +688,7 @@ class TestEnum(unittest.TestCase):
self
.
assertIn
(
e
,
SummerMonth
)
self
.
assertIs
(
type
(
e
),
SummerMonth
)
def
test_programatic_function_string_list
(
self
):
def
test_program
m
atic_function_string_list
(
self
):
SummerMonth
=
Enum
(
'SummerMonth'
,
[
'june'
,
'july'
,
'august'
])
lst
=
list
(
SummerMonth
)
self
.
assertEqual
(
len
(
lst
),
len
(
SummerMonth
))
...
...
@@ -705,7 +705,7 @@ class TestEnum(unittest.TestCase):
self
.
assertIn
(
e
,
SummerMonth
)
self
.
assertIs
(
type
(
e
),
SummerMonth
)
def
test_programatic_function_string_list_with_start
(
self
):
def
test_program
m
atic_function_string_list_with_start
(
self
):
SummerMonth
=
Enum
(
'SummerMonth'
,
[
'june'
,
'july'
,
'august'
],
start
=
20
)
lst
=
list
(
SummerMonth
)
self
.
assertEqual
(
len
(
lst
),
len
(
SummerMonth
))
...
...
@@ -722,7 +722,7 @@ class TestEnum(unittest.TestCase):
self
.
assertIn
(
e
,
SummerMonth
)
self
.
assertIs
(
type
(
e
),
SummerMonth
)
def
test_programatic_function_iterable
(
self
):
def
test_program
m
atic_function_iterable
(
self
):
SummerMonth
=
Enum
(
'SummerMonth'
,
((
'june'
,
1
),
(
'july'
,
2
),
(
'august'
,
3
))
...
...
@@ -742,7 +742,7 @@ class TestEnum(unittest.TestCase):
self
.
assertIn
(
e
,
SummerMonth
)
self
.
assertIs
(
type
(
e
),
SummerMonth
)
def
test_programatic_function_from_dict
(
self
):
def
test_program
m
atic_function_from_dict
(
self
):
SummerMonth
=
Enum
(
'SummerMonth'
,
OrderedDict
(((
'june'
,
1
),
(
'july'
,
2
),
(
'august'
,
3
)))
...
...
@@ -762,7 +762,7 @@ class TestEnum(unittest.TestCase):
self
.
assertIn
(
e
,
SummerMonth
)
self
.
assertIs
(
type
(
e
),
SummerMonth
)
def
test_programatic_function_type
(
self
):
def
test_program
m
atic_function_type
(
self
):
SummerMonth
=
Enum
(
'SummerMonth'
,
'june july august'
,
type
=
int
)
lst
=
list
(
SummerMonth
)
self
.
assertEqual
(
len
(
lst
),
len
(
SummerMonth
))
...
...
@@ -778,7 +778,7 @@ class TestEnum(unittest.TestCase):
self
.
assertIn
(
e
,
SummerMonth
)
self
.
assertIs
(
type
(
e
),
SummerMonth
)
def
test_programatic_function_type_with_start
(
self
):
def
test_program
m
atic_function_type_with_start
(
self
):
SummerMonth
=
Enum
(
'SummerMonth'
,
'june july august'
,
type
=
int
,
start
=
30
)
lst
=
list
(
SummerMonth
)
self
.
assertEqual
(
len
(
lst
),
len
(
SummerMonth
))
...
...
@@ -794,7 +794,7 @@ class TestEnum(unittest.TestCase):
self
.
assertIn
(
e
,
SummerMonth
)
self
.
assertIs
(
type
(
e
),
SummerMonth
)
def
test_programatic_function_type_from_subclass
(
self
):
def
test_program
m
atic_function_type_from_subclass
(
self
):
SummerMonth
=
IntEnum
(
'SummerMonth'
,
'june july august'
)
lst
=
list
(
SummerMonth
)
self
.
assertEqual
(
len
(
lst
),
len
(
SummerMonth
))
...
...
@@ -810,7 +810,7 @@ class TestEnum(unittest.TestCase):
self
.
assertIn
(
e
,
SummerMonth
)
self
.
assertIs
(
type
(
e
),
SummerMonth
)
def
test_programatic_function_type_from_subclass_with_start
(
self
):
def
test_program
m
atic_function_type_from_subclass_with_start
(
self
):
SummerMonth
=
IntEnum
(
'SummerMonth'
,
'june july august'
,
start
=
40
)
lst
=
list
(
SummerMonth
)
self
.
assertEqual
(
len
(
lst
),
len
(
SummerMonth
))
...
...
Lib/test/test_http_cookiejar.py
View file @
25ecfd00
...
...
@@ -396,7 +396,7 @@ class CookieTests(unittest.TestCase):
## comma-separated list, it'll be a headache to parse (at least my head
## starts hurting every time I think of that code).
## - Expires: You'll get all sorts of date formats in the expires,
## including em
tp
y expires attributes ("expires="). Be as flexible as you
## including em
pt
y expires attributes ("expires="). Be as flexible as you
## can, and certainly don't expect the weekday to be there; if you can't
## parse it, just ignore it and pretend it's a session cookie.
## - Domain-matching: Netscape uses the 2-dot rule for _all_ domains, not
...
...
Lib/test/test_math.py
View file @
25ecfd00
...
...
@@ -1254,8 +1254,8 @@ class IsCloseTests(unittest.TestCase):
(
1.0e200
,
.
999999999999999e200
)]
self
.
assertAllNotClose
(
zero_tolerance_not_close_examples
,
rel_tol
=
0.0
)
def
test_as
sy
metry
(
self
):
# test the as
sy
metry example from PEP 485
def
test_as
ym
metry
(
self
):
# test the as
ym
metry example from PEP 485
self
.
assertAllClose
([(
9
,
10
),
(
10
,
9
)],
rel_tol
=
0.1
)
def
test_integers
(
self
):
...
...
Lib/test/test_nntplib.py
View file @
25ecfd00
...
...
@@ -1465,14 +1465,14 @@ class MockSocketTests(unittest.TestCase):
def
test_service_temporarily_unavailable
(
self
):
#Test service temporarily unavailable
class
Handler
(
NNTPv1Handler
):
welcome
=
'400 Service temporarily unavilable'
welcome
=
'400 Service temporarily unav
a
ilable'
self
.
check_constructor_error_conditions
(
Handler
,
nntplib
.
NNTPTemporaryError
,
Handler
.
welcome
)
def
test_service_permanently_unavailable
(
self
):
#Test service permanently unavailable
class
Handler
(
NNTPv1Handler
):
welcome
=
'502 Service permanently unavilable'
welcome
=
'502 Service permanently unav
a
ilable'
self
.
check_constructor_error_conditions
(
Handler
,
nntplib
.
NNTPPermanentError
,
Handler
.
welcome
)
...
...
Lib/test/test_shutil.py
View file @
25ecfd00
...
...
@@ -1257,7 +1257,7 @@ class TestShutil(unittest.TestCase):
self
.
assertRaises
(
shutil
.
ReadError
,
unpack_archive
,
TESTFN
)
self
.
assertRaises
(
ValueError
,
unpack_archive
,
TESTFN
,
format
=
'xxx'
)
def
test_unpack_regist
e
ry
(
self
):
def
test_unpack_registry
(
self
):
formats
=
get_unpack_formats
()
...
...
Lib/test/test_structseq.py
View file @
25ecfd00
...
...
@@ -97,7 +97,7 @@ class StructSeqTest(unittest.TestCase):
class
Exc
(
Exception
):
pass
# Devious code could crash structseqs' contructors
# Devious code could crash structseqs' con
s
tructors
class
C
:
def
__getitem__
(
self
,
i
):
raise
Exc
...
...
Lib/test/test_subprocess.py
View file @
25ecfd00
...
...
@@ -1354,7 +1354,7 @@ class POSIXProcessTestCase(BaseTestCase):
desired_exception
=
e
desired_exception
.
strerror
+=
': '
+
repr
(
self
.
_nonexistent_dir
)
else
:
self
.
fail
(
"chdir to nonexist
a
nt directory %s succeeded."
%
self
.
fail
(
"chdir to nonexist
e
nt directory %s succeeded."
%
self
.
_nonexistent_dir
)
return
desired_exception
...
...
Lib/unittest/case.py
View file @
25ecfd00
...
...
@@ -836,7 +836,7 @@ class TestCase(object):
between the two objects is more than the given delta.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
as significant digits (measured from the most sign
i
ficant digit).
If the two objects compare equal then they will automatically
compare almost equal.
...
...
@@ -875,7 +875,7 @@ class TestCase(object):
between the two objects is less than the given delta.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
as significant digits (measured from the most sign
i
ficant digit).
Objects that are equal automatically fail.
"""
...
...
Misc/NEWS
View file @
25ecfd00
...
...
@@ -2210,7 +2210,7 @@ Library
the
FTP
connection
failed
to
fix
a
ResourceWarning
.
-
Issue
#
23853
:
:
meth
:`
socket
.
socket
.
sendall
`
does
no
more
reset
the
socket
timeout
each
time
data
is
sent
successfuly
.
The
socket
timeout
is
now
the
timeout
each
time
data
is
sent
successful
l
y
.
The
socket
timeout
is
now
the
maximum
total
duration
to
send
all
data
.
-
Issue
#
22721
:
An
order
of
multiline
pprint
output
of
set
or
dict
containing
...
...
Modules/_ctypes/_ctypes.c
View file @
25ecfd00
...
...
@@ -332,7 +332,7 @@ _ctypes_alloc_format_string_with_shape(int ndim, const Py_ssize_t *shape,
/*
PyCStructType_Type - a meta type/class. Creating a new class using this one as
__metaclass__ will call the contructor StructUnionType_new. It replaces the
__metaclass__ will call the con
s
tructor StructUnionType_new. It replaces the
tp_dict member with a new instance of StgDict, and initializes the C
accessible fields somehow.
*/
...
...
Modules/itertoolsmodule.c
View file @
25ecfd00
...
...
@@ -1911,7 +1911,7 @@ iterable, until all of the iterables are exhausted.");
PyDoc_STRVAR
(
chain_from_iterable_doc
,
"chain.from_iterable(iterable) --> chain object
\n
\
\n
\
Alternate chain() contructor taking a single iterable argument
\n
\
Alternate chain() con
s
tructor taking a single iterable argument
\n
\
that evaluates lazily."
);
static
PyMethodDef
chain_methods
[]
=
{
...
...
Objects/exceptions.c
View file @
25ecfd00
...
...
@@ -1855,7 +1855,7 @@ UnicodeEncodeError_str(PyObject *self)
return
PyUnicode_FromString
(
""
);
/* Get reason and encoding as strings, which they might not be if
they've been modified after we were contructed. */
they've been modified after we were con
s
tructed. */
reason_str
=
PyObject_Str
(
uself
->
reason
);
if
(
reason_str
==
NULL
)
goto
done
;
...
...
@@ -1980,7 +1980,7 @@ UnicodeDecodeError_str(PyObject *self)
return
PyUnicode_FromString
(
""
);
/* Get reason and encoding as strings, which they might not be if
they've been modified after we were contructed. */
they've been modified after we were con
s
tructed. */
reason_str
=
PyObject_Str
(
uself
->
reason
);
if
(
reason_str
==
NULL
)
goto
done
;
...
...
@@ -2078,7 +2078,7 @@ UnicodeTranslateError_str(PyObject *self)
return
PyUnicode_FromString
(
""
);
/* Get reason as a string, which it might not be if it's been
modified after we were contructed. */
modified after we were con
s
tructed. */
reason_str
=
PyObject_Str
(
uself
->
reason
);
if
(
reason_str
==
NULL
)
goto
done
;
...
...
Objects/longobject.c
View file @
25ecfd00
...
...
@@ -775,10 +775,10 @@ _PyLong_FromByteArray(const unsigned char* bytes, size_t n,
size_t
i
;
const
unsigned
char
*
p
=
pendbyte
;
const
int
pincr
=
-
incr
;
/* search MSB to LSB */
const
unsigned
char
insignficant
=
is_signed
?
0xff
:
0x00
;
const
unsigned
char
insign
i
ficant
=
is_signed
?
0xff
:
0x00
;
for
(
i
=
0
;
i
<
n
;
++
i
,
p
+=
pincr
)
{
if
(
*
p
!=
insignficant
)
if
(
*
p
!=
insign
i
ficant
)
break
;
}
numsignificantbytes
=
n
-
i
;
...
...
Tools/clinic/clinic_test.py
View file @
25ecfd00
...
...
@@ -90,7 +90,7 @@ class ClinicWholeFileTest(TestCase):
# the "end line" for the block if it
# didn't end in "\n" (as in, the last)
# byte of the file was '/'.
# so it wou
dl
spit out an end line for you.
# so it wou
ld
spit out an end line for you.
# and since you really already had one,
# the last line of the block got corrupted.
c
=
clinic
.
Clinic
(
clinic
.
CLanguage
(
None
))
...
...
Tools/demo/redemo.py
View file @
25ecfd00
#!/usr/bin/env python3
"""Basic regular expression demostration facility (Perl style syntax)."""
"""Basic regular expression demo
n
stration facility (Perl style syntax)."""
from
tkinter
import
*
import
re
...
...
Tools/freeze/freeze.py
View file @
25ecfd00
...
...
@@ -159,7 +159,7 @@ def main():
except
getopt
.
error
as
msg
:
usage
(
'getopt error: '
+
str
(
msg
))
# proces option arguments
# proces
s
option arguments
for
o
,
a
in
opts
:
if
o
==
'-h'
:
print
(
__doc__
)
...
...
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