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
230a60c6
Commit
230a60c6
authored
Nov 09, 2002
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Whitespace normalization.
parent
b0ead4ea
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
28 deletions
+27
-28
Lib/ConfigParser.py
Lib/ConfigParser.py
+1
-1
Lib/httplib.py
Lib/httplib.py
+2
-2
Lib/locale.py
Lib/locale.py
+2
-2
Lib/posixpath.py
Lib/posixpath.py
+0
-1
Lib/site.py
Lib/site.py
+1
-1
Lib/telnetlib.py
Lib/telnetlib.py
+5
-5
Lib/test/test_bz2.py
Lib/test/test_bz2.py
+16
-16
No files found.
Lib/ConfigParser.py
View file @
230a60c6
...
...
@@ -525,7 +525,7 @@ class ConfigParser(RawConfigParser):
def _interpolate(self, section, option, rawval, vars):
# do the string interpolation
value = rawval
depth = MAX_INTERPOLATION_DEPTH
depth = MAX_INTERPOLATION_DEPTH
while depth: # Loop through this until it's done
depth -= 1
if value.find("%(") != -1:
...
...
Lib/httplib.py
View file @
230a60c6
...
...
@@ -371,7 +371,7 @@ class HTTPResponse:
if
self
.
chunked
:
return
self
.
_read_chunked
(
amt
)
if
amt
is
None
:
# unbounded read
if
self
.
will_close
:
...
...
@@ -441,7 +441,7 @@ class HTTPResponse:
self
.
close
()
return
value
def
_safe_read
(
self
,
amt
):
"""Read the number of bytes requested, compensating for partial reads.
...
...
Lib/locale.py
View file @
230a60c6
...
...
@@ -272,7 +272,7 @@ def _parse_localename(localename):
# since some systems may use other encodings for these
# locales. Also, we ignore other modifiers.
return
code
,
'iso-8859-15'
if
'.'
in
code
:
return
code
.
split
(
'.'
)[:
2
]
elif
code
==
'C'
:
...
...
@@ -420,7 +420,7 @@ else:
return
result
else
:
return
nl_langinfo
(
CODESET
)
### Database
#
...
...
Lib/posixpath.py
View file @
230a60c6
...
...
@@ -411,4 +411,3 @@ symbolic links encountered in the path."""
return
filename
supports_unicode_filenames
=
False
Lib/site.py
View file @
230a60c6
...
...
@@ -94,7 +94,7 @@ del dir, dircase, L
# (especially for Guido :-)
# XXX This should not be part of site.py, since it is needed even when
# using the -S option for Python. See http://www.python.org/sf/586680
if
(
os
.
name
==
"posix"
and
sys
.
path
and
if
(
os
.
name
==
"posix"
and
sys
.
path
and
os
.
path
.
basename
(
sys
.
path
[
-
1
])
==
"Modules"
):
from
distutils.util
import
get_platform
s
=
"build/lib.%s-%.3s"
%
(
get_platform
(),
sys
.
version
)
...
...
Lib/telnetlib.py
View file @
230a60c6
...
...
@@ -399,12 +399,12 @@ class Telnet:
if
not
buf
and
self
.
eof
and
not
self
.
rawq
:
raise
EOFError
,
'telnet connection closed'
return
buf
def
read_sb_data
(
self
):
"""Return any data available in the SB ... SE queue.
Return '' if no SB ... SE available. Should only be called
after seeing a SB or SE command. When a new SB command is
Return '' if no SB ... SE available. Should only be called
after seeing a SB or SE command. When a new SB command is
found, old unread SB data will be discarded. Don't block.
"""
...
...
@@ -442,7 +442,7 @@ class Telnet:
if
c
in
(
DO
,
DONT
,
WILL
,
WONT
):
self
.
iacseq
+=
c
continue
self
.
iacseq
=
''
if
c
==
IAC
:
buf
[
self
.
sb
]
=
buf
[
self
.
sb
]
+
c
...
...
@@ -468,7 +468,7 @@ class Telnet:
self
.
iacseq
=
''
opt
=
c
if
cmd
in
(
DO
,
DONT
):
self
.
msg
(
'IAC %s %d'
,
self
.
msg
(
'IAC %s %d'
,
cmd
==
DO
and
'DO'
or
'DONT'
,
ord
(
opt
))
if
self
.
option_callback
:
self
.
option_callback
(
self
.
sock
,
cmd
,
opt
)
...
...
Lib/test/test_bz2.py
View file @
230a60c6
...
...
@@ -28,11 +28,11 @@ class BZ2FileTest(BaseTest):
def
setUp
(
self
):
self
.
filename
=
tempfile
.
mktemp
(
"bz2"
)
def
tearDown
(
self
):
if
os
.
path
.
isfile
(
self
.
filename
):
os
.
unlink
(
self
.
filename
)
def
createTempFile
(
self
,
crlf
=
0
):
f
=
open
(
self
.
filename
,
"wb"
)
if
crlf
:
...
...
@@ -41,14 +41,14 @@ class BZ2FileTest(BaseTest):
data
=
self
.
DATA
f
.
write
(
data
)
f
.
close
()
def
testRead
(
self
):
"Test BZ2File.read()"
self
.
createTempFile
()
bz2f
=
BZ2File
(
self
.
filename
)
self
.
assertEqual
(
bz2f
.
read
(),
self
.
TEXT
)
bz2f
.
close
()
def
testReadChunk10
(
self
):
"Test BZ2File.read() in chunks of 10 bytes"
self
.
createTempFile
()
...
...
@@ -61,14 +61,14 @@ class BZ2FileTest(BaseTest):
text
+=
str
self
.
assertEqual
(
text
,
text
)
bz2f
.
close
()
def
testRead100
(
self
):
"Test BZ2File.read(100)"
self
.
createTempFile
()
bz2f
=
BZ2File
(
self
.
filename
)
self
.
assertEqual
(
bz2f
.
read
(
100
),
self
.
TEXT
[:
100
])
bz2f
.
close
()
def
testReadLine
(
self
):
"Test BZ2File.readline()"
self
.
createTempFile
()
...
...
@@ -77,7 +77,7 @@ class BZ2FileTest(BaseTest):
for
line
in
sio
.
readlines
():
self
.
assertEqual
(
bz2f
.
readline
(),
line
)
bz2f
.
close
()
def
testReadLines
(
self
):
"Test BZ2File.readlines()"
self
.
createTempFile
()
...
...
@@ -85,7 +85,7 @@ class BZ2FileTest(BaseTest):
sio
=
StringIO
(
self
.
TEXT
)
self
.
assertEqual
(
bz2f
.
readlines
(),
sio
.
readlines
())
bz2f
.
close
()
def
testIterator
(
self
):
"Test iter(BZ2File)"
self
.
createTempFile
()
...
...
@@ -93,7 +93,7 @@ class BZ2FileTest(BaseTest):
sio
=
StringIO
(
self
.
TEXT
)
self
.
assertEqual
(
list
(
iter
(
bz2f
)),
sio
.
readlines
())
bz2f
.
close
()
def
testXReadLines
(
self
):
"Test BZ2File.xreadlines()"
self
.
createTempFile
()
...
...
@@ -101,7 +101,7 @@ class BZ2FileTest(BaseTest):
sio
=
StringIO
(
self
.
TEXT
)
self
.
assertEqual
(
list
(
bz2f
.
xreadlines
()),
sio
.
readlines
())
bz2f
.
close
()
def
testUniversalNewlinesLF
(
self
):
"Test BZ2File.read() with universal newlines (
\
\
n)"
self
.
createTempFile
()
...
...
@@ -109,7 +109,7 @@ class BZ2FileTest(BaseTest):
self
.
assertEqual
(
bz2f
.
read
(),
self
.
TEXT
)
self
.
assertEqual
(
bz2f
.
newlines
,
"
\
n
"
)
bz2f
.
close
()
def
testUniversalNewlinesCRLF
(
self
):
"Test BZ2File.read() with universal newlines (
\
\
r
\
\
n)"
self
.
createTempFile
(
crlf
=
1
)
...
...
@@ -117,7 +117,7 @@ class BZ2FileTest(BaseTest):
self
.
assertEqual
(
bz2f
.
read
(),
self
.
TEXT
)
self
.
assertEqual
(
bz2f
.
newlines
,
"
\
r
\
n
"
)
bz2f
.
close
()
def
testWrite
(
self
):
"Test BZ2File.write()"
bz2f
=
BZ2File
(
self
.
filename
,
"w"
)
...
...
@@ -151,7 +151,7 @@ class BZ2FileTest(BaseTest):
f
=
open
(
self
.
filename
)
self
.
assertEqual
(
self
.
decompress
(
f
.
read
()),
self
.
TEXT
)
f
.
close
()
def
testSeekForward
(
self
):
"Test BZ2File.seek(150, 0)"
self
.
createTempFile
()
...
...
@@ -173,7 +173,7 @@ class BZ2FileTest(BaseTest):
bz2f
=
BZ2File
(
self
.
filename
)
bz2f
.
seek
(
-
150
,
2
)
self
.
assertEqual
(
bz2f
.
read
(),
self
.
TEXT
[
len
(
self
.
TEXT
)
-
150
:])
def
testSeekPostEnd
(
self
):
"Test BZ2File.seek(150000)"
self
.
createTempFile
()
...
...
@@ -258,7 +258,7 @@ class BZ2DecompressorTest(BaseTest):
class
FuncTest
(
BaseTest
):
"Test module functions"
def
testCompress
(
self
):
"Test compress() function"
data
=
compress
(
self
.
TEXT
)
...
...
@@ -268,7 +268,7 @@ class FuncTest(BaseTest):
"Test decompress() function"
text
=
decompress
(
self
.
DATA
)
self
.
assertEqual
(
text
,
self
.
TEXT
)
def
testDecompressEmpty
(
self
):
"Test decompress() function with empty string"
text
=
decompress
(
""
)
...
...
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