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
cf70d322
Commit
cf70d322
authored
Mar 07, 2003
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Whitespace normalization.
parent
b01d20fc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
44 deletions
+44
-44
Lib/compiler/transformer.py
Lib/compiler/transformer.py
+1
-1
Lib/dis.py
Lib/dis.py
+39
-39
Lib/test/test_plistlib.py
Lib/test/test_plistlib.py
+2
-2
Lib/test/test_ucn.py
Lib/test/test_ucn.py
+1
-1
Lib/test/test_unicodedata.py
Lib/test/test_unicodedata.py
+1
-1
No files found.
Lib/compiler/transformer.py
View file @
cf70d322
...
@@ -142,7 +142,7 @@ class Transformer:
...
@@ -142,7 +142,7 @@ class Transformer:
self
.
encoding
=
node
[
2
]
self
.
encoding
=
node
[
2
]
node
=
node
[
1
]
node
=
node
[
1
]
n
=
node
[
0
]
n
=
node
[
0
]
if
n
==
symbol
.
single_input
:
if
n
==
symbol
.
single_input
:
return
self
.
single_input
(
node
[
1
:])
return
self
.
single_input
(
node
[
1
:])
if
n
==
symbol
.
file_input
:
if
n
==
symbol
.
file_input
:
...
...
Lib/dis.py
View file @
cf70d322
...
@@ -131,45 +131,45 @@ def disassemble(co, lasti=-1):
...
@@ -131,45 +131,45 @@ def disassemble(co, lasti=-1):
def
disassemble_string
(
code
,
lasti
=-
1
,
varnames
=
None
,
names
=
None
,
def
disassemble_string
(
code
,
lasti
=-
1
,
varnames
=
None
,
names
=
None
,
constants
=
None
):
constants
=
None
):
labels
=
findlabels
(
code
)
labels
=
findlabels
(
code
)
n
=
len
(
code
)
n
=
len
(
code
)
i
=
0
i
=
0
while
i
<
n
:
while
i
<
n
:
c
=
code
[
i
]
c
=
code
[
i
]
op
=
ord
(
c
)
op
=
ord
(
c
)
if
op
==
opmap
[
'SET_LINENO'
]
and
i
>
0
:
if
op
==
opmap
[
'SET_LINENO'
]
and
i
>
0
:
print
# Extra blank line
print
# Extra blank line
if
i
==
lasti
:
print
'-->'
,
if
i
==
lasti
:
print
'-->'
,
else
:
print
' '
,
else
:
print
' '
,
if
i
in
labels
:
print
'>>'
,
if
i
in
labels
:
print
'>>'
,
else
:
print
' '
,
else
:
print
' '
,
print
`i`
.
rjust
(
4
),
print
`i`
.
rjust
(
4
),
print
opname
[
op
].
ljust
(
15
),
print
opname
[
op
].
ljust
(
15
),
i
=
i
+
1
i
=
i
+
1
if
op
>=
HAVE_ARGUMENT
:
if
op
>=
HAVE_ARGUMENT
:
oparg
=
ord
(
code
[
i
])
+
ord
(
code
[
i
+
1
])
*
256
oparg
=
ord
(
code
[
i
])
+
ord
(
code
[
i
+
1
])
*
256
i
=
i
+
2
i
=
i
+
2
print
`oparg`
.
rjust
(
5
),
print
`oparg`
.
rjust
(
5
),
if
op
in
hasconst
:
if
op
in
hasconst
:
if
constants
:
if
constants
:
print
'('
+
`constants[oparg]`
+
')'
,
print
'('
+
`constants[oparg]`
+
')'
,
else
:
else
:
print
'(%d)'
%
oparg
,
print
'(%d)'
%
oparg
,
elif
op
in
hasname
:
elif
op
in
hasname
:
if
names
is
not
None
:
if
names
is
not
None
:
print
'('
+
names
[
oparg
]
+
')'
,
print
'('
+
names
[
oparg
]
+
')'
,
else
:
else
:
print
'(%d)'
%
oparg
,
print
'(%d)'
%
oparg
,
elif
op
in
hasjrel
:
elif
op
in
hasjrel
:
print
'(to '
+
`i + oparg`
+
')'
,
print
'(to '
+
`i + oparg`
+
')'
,
elif
op
in
haslocal
:
elif
op
in
haslocal
:
if
varnames
:
if
varnames
:
print
'('
+
varnames
[
oparg
]
+
')'
,
print
'('
+
varnames
[
oparg
]
+
')'
,
else
:
else
:
print
'(%d)'
%
oparg
,
print
'(%d)'
%
oparg
,
elif
op
in
hascompare
:
elif
op
in
hascompare
:
print
'('
+
cmp_op
[
oparg
]
+
')'
,
print
'('
+
cmp_op
[
oparg
]
+
')'
,
print
print
disco
=
disassemble
# XXX For backwards compatibility
disco
=
disassemble
# XXX For backwards compatibility
...
...
Lib/test/test_plistlib.py
View file @
cf70d322
...
@@ -37,7 +37,7 @@ class TestPlistlib(unittest.TestCase):
...
@@ -37,7 +37,7 @@ class TestPlistlib(unittest.TestCase):
else
:
else
:
pl
[
'aDate'
]
=
plistlib
.
Date
(
time
.
mktime
(
time
.
gmtime
()))
pl
[
'aDate'
]
=
plistlib
.
Date
(
time
.
mktime
(
time
.
gmtime
()))
return
pl
return
pl
def
test_create
(
self
):
def
test_create
(
self
):
pl
=
self
.
_create
()
pl
=
self
.
_create
()
self
.
assertEqual
(
pl
[
"aString"
],
"Doodah"
)
self
.
assertEqual
(
pl
[
"aString"
],
"Doodah"
)
...
@@ -47,7 +47,7 @@ class TestPlistlib(unittest.TestCase):
...
@@ -47,7 +47,7 @@ class TestPlistlib(unittest.TestCase):
pl
=
self
.
_create
()
pl
=
self
.
_create
()
pl
.
write
(
test_support
.
TESTFN
)
pl
.
write
(
test_support
.
TESTFN
)
pl2
=
plistlib
.
Plist
.
fromFile
(
test_support
.
TESTFN
)
pl2
=
plistlib
.
Plist
.
fromFile
(
test_support
.
TESTFN
)
self
.
assertEqual
(
dict
(
pl
),
dict
(
pl2
))
self
.
assertEqual
(
dict
(
pl
),
dict
(
pl2
))
...
...
Lib/test/test_ucn.py
View file @
cf70d322
...
@@ -15,7 +15,7 @@ class UnicodeNamesTest(unittest.TestCase):
...
@@ -15,7 +15,7 @@ class UnicodeNamesTest(unittest.TestCase):
def
checkletter
(
self
,
name
,
code
):
def
checkletter
(
self
,
name
,
code
):
# Helper that put all \N escapes inside eval'd raw strings,
# Helper that put all \N escapes inside eval'd raw strings,
# to make sure this script runs even if the compiler
# to make sure this script runs even if the compiler
# chokes on \N escapes
# chokes on \N escapes
res
=
eval
(
ur'u"\
N{%s}
"'
%
name
)
res
=
eval
(
ur'u"\
N{%s}
"'
%
name
)
self
.
assertEqual
(
res
,
code
)
self
.
assertEqual
(
res
,
code
)
...
...
Lib/test/test_unicodedata.py
View file @
cf70d322
...
@@ -191,7 +191,7 @@ class UnicodeMiscTest(UnicodeDatabaseTest):
...
@@ -191,7 +191,7 @@ class UnicodeMiscTest(UnicodeDatabaseTest):
def
test_digit_numeric_consistent
(
self
):
def
test_digit_numeric_consistent
(
self
):
# Test that digit and numeric are consistent,
# Test that digit and numeric are consistent,
# i.e. if a character has a digit value,
# i.e. if a character has a digit value,
# it's numeric value should be the same.
# it's numeric value should be the same.
count
=
0
count
=
0
for
i
in
xrange
(
0x10000
):
for
i
in
xrange
(
0x10000
):
...
...
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