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
e741703c
Commit
e741703c
authored
Aug 25, 2006
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove usage of backticks.
parent
5f0dc878
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
14 additions
and
16 deletions
+14
-16
Lib/idlelib/EditorWindow.py
Lib/idlelib/EditorWindow.py
+1
-1
Lib/idlelib/HyperParser.py
Lib/idlelib/HyperParser.py
+1
-1
Lib/plat-mac/aetypes.py
Lib/plat-mac/aetypes.py
+1
-1
Lib/test/list_tests.py
Lib/test/list_tests.py
+1
-1
Lib/test/test_doctest.py
Lib/test/test_doctest.py
+1
-1
Lib/test/test_grammar.py
Lib/test/test_grammar.py
+1
-3
Lib/test/test_mutants.py
Lib/test/test_mutants.py
+1
-1
Lib/test/test_site.py
Lib/test/test_site.py
+1
-1
Lib/test/test_userdict.py
Lib/test/test_userdict.py
+1
-1
Lib/test/test_weakref.py
Lib/test/test_weakref.py
+2
-2
Lib/test/tokenize_tests.txt
Lib/test/tokenize_tests.txt
+1
-1
Lib/wsgiref/headers.py
Lib/wsgiref/headers.py
+1
-1
Lib/wsgiref/simple_server.py
Lib/wsgiref/simple_server.py
+1
-1
No files found.
Lib/idlelib/EditorWindow.py
View file @
e741703c
...
@@ -1138,7 +1138,7 @@ class EditorWindow(object):
...
@@ -1138,7 +1138,7 @@ class EditorWindow(object):
if
not
self
.
context_use_ps1
:
if
not
self
.
context_use_ps1
:
for
context
in
self
.
num_context_lines
:
for
context
in
self
.
num_context_lines
:
startat
=
max
(
lno
-
context
,
1
)
startat
=
max
(
lno
-
context
,
1
)
startatindex
=
`startat`
+
".0"
startatindex
=
repr
(
startat
)
+
".0"
rawtext
=
text
.
get
(
startatindex
,
"insert"
)
rawtext
=
text
.
get
(
startatindex
,
"insert"
)
y
.
set_str
(
rawtext
)
y
.
set_str
(
rawtext
)
bod
=
y
.
find_good_parse_start
(
bod
=
y
.
find_good_parse_start
(
...
...
Lib/idlelib/HyperParser.py
View file @
e741703c
...
@@ -31,7 +31,7 @@ class HyperParser:
...
@@ -31,7 +31,7 @@ class HyperParser:
if
not
editwin
.
context_use_ps1
:
if
not
editwin
.
context_use_ps1
:
for
context
in
editwin
.
num_context_lines
:
for
context
in
editwin
.
num_context_lines
:
startat
=
max
(
lno
-
context
,
1
)
startat
=
max
(
lno
-
context
,
1
)
startatindex
=
`startat`
+
".0"
startatindex
=
repr
(
startat
)
+
".0"
stopatindex
=
"%d.end"
%
lno
stopatindex
=
"%d.end"
%
lno
# We add the newline because PyParse requires a newline at end.
# We add the newline because PyParse requires a newline at end.
# We add a space so that index won't be at end of line, so that
# We add a space so that index won't be at end of line, so that
...
...
Lib/plat-mac/aetypes.py
View file @
e741703c
...
@@ -128,7 +128,7 @@ class Keyword:
...
@@ -128,7 +128,7 @@ class Keyword:
self
.
keyword
=
"%-4.4s"
%
str
(
keyword
)
self
.
keyword
=
"%-4.4s"
%
str
(
keyword
)
def
__repr__
(
self
):
def
__repr__
(
self
):
return
"Keyword(%r)"
%
`self.keyword`
return
"Keyword(%r)"
%
self
.
keyword
def
__str__
(
self
):
def
__str__
(
self
):
return
string
.
strip
(
self
.
keyword
)
return
string
.
strip
(
self
.
keyword
)
...
...
Lib/test/list_tests.py
View file @
e741703c
...
@@ -37,7 +37,7 @@ class CommonTest(seq_tests.CommonTest):
...
@@ -37,7 +37,7 @@ class CommonTest(seq_tests.CommonTest):
self
.
assertEqual
(
str
(
a0
),
str
(
l0
))
self
.
assertEqual
(
str
(
a0
),
str
(
l0
))
self
.
assertEqual
(
repr
(
a0
),
repr
(
l0
))
self
.
assertEqual
(
repr
(
a0
),
repr
(
l0
))
self
.
assertEqual
(
`a2`
,
`l2`
)
self
.
assertEqual
(
repr
(
a2
),
repr
(
l2
)
)
self
.
assertEqual
(
str
(
a2
),
"[0, 1, 2]"
)
self
.
assertEqual
(
str
(
a2
),
"[0, 1, 2]"
)
self
.
assertEqual
(
repr
(
a2
),
"[0, 1, 2]"
)
self
.
assertEqual
(
repr
(
a2
),
"[0, 1, 2]"
)
...
...
Lib/test/test_doctest.py
View file @
e741703c
...
@@ -605,7 +605,7 @@ text:
...
@@ -605,7 +605,7 @@ text:
... if isinstance(piece, doctest.Example):
... if isinstance(piece, doctest.Example):
... print 'Example:', (piece.source, piece.want, piece.lineno)
... print 'Example:', (piece.source, piece.want, piece.lineno)
... else:
... else:
... print ' Text:',
`piece`
... print ' Text:',
repr(piece)
Text: '\n'
Text: '\n'
Example: ('x, y = 2, 3 # no output expected\n', '', 1)
Example: ('x, y = 2, 3 # no output expected\n', '', 1)
Text: ''
Text: ''
...
...
Lib/test/test_grammar.py
View file @
e741703c
...
@@ -685,7 +685,7 @@ print L
...
@@ -685,7 +685,7 @@ print L
print
'atoms'
print
'atoms'
### atom: '(' [testlist] ')' | '[' [testlist] ']' | '{' [dictmaker] '}' |
'`' testlist '`' |
NAME | NUMBER | STRING
### atom: '(' [testlist] ')' | '[' [testlist] ']' | '{' [dictmaker] '}' | NAME | NUMBER | STRING
### dictmaker: test ':' test (',' test ':' test)* [',']
### dictmaker: test ':' test (',' test ':' test)* [',']
x
=
(
1
)
x
=
(
1
)
...
@@ -706,8 +706,6 @@ x = {'one': 1, 'two': 2}
...
@@ -706,8 +706,6 @@ x = {'one': 1, 'two': 2}
x
=
{
'one'
:
1
,
'two'
:
2
,}
x
=
{
'one'
:
1
,
'two'
:
2
,}
x
=
{
'one'
:
1
,
'two'
:
2
,
'three'
:
3
,
'four'
:
4
,
'five'
:
5
,
'six'
:
6
}
x
=
{
'one'
:
1
,
'two'
:
2
,
'three'
:
3
,
'four'
:
4
,
'five'
:
5
,
'six'
:
6
}
x
=
`x`
x
=
`1 or 2 or 3`
x
=
x
x
=
x
x
=
'x'
x
=
'x'
x
=
123
x
=
123
...
...
Lib/test/test_mutants.py
View file @
e741703c
...
@@ -209,7 +209,7 @@ class Machiavelli:
...
@@ -209,7 +209,7 @@ class Machiavelli:
# Tim sez: "luck of the draw; crashes with or without for me."
# Tim sez: "luck of the draw; crashes with or without for me."
print
>>
f
print
>>
f
return
`"machiavelli"`
return
repr
(
"machiavelli"
)
def
__hash__
(
self
):
def
__hash__
(
self
):
return
0
return
0
...
...
Lib/test/test_site.py
View file @
e741703c
...
@@ -164,7 +164,7 @@ class ImportSideEffectTests(unittest.TestCase):
...
@@ -164,7 +164,7 @@ class ImportSideEffectTests(unittest.TestCase):
site
.
abs__file__
()
site
.
abs__file__
()
for
module
in
(
sys
,
os
,
__builtin__
):
for
module
in
(
sys
,
os
,
__builtin__
):
try
:
try
:
self
.
failUnless
(
os
.
path
.
isabs
(
module
.
__file__
),
`module`
)
self
.
failUnless
(
os
.
path
.
isabs
(
module
.
__file__
),
repr
(
module
)
)
except
AttributeError
:
except
AttributeError
:
continue
continue
# We could try everything in sys.modules; however, when regrtest.py
# We could try everything in sys.modules; however, when regrtest.py
...
...
Lib/test/test_userdict.py
View file @
e741703c
...
@@ -46,7 +46,7 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol):
...
@@ -46,7 +46,7 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol):
# Test __repr__
# Test __repr__
self
.
assertEqual
(
str
(
u0
),
str
(
d0
))
self
.
assertEqual
(
str
(
u0
),
str
(
d0
))
self
.
assertEqual
(
repr
(
u1
),
repr
(
d1
))
self
.
assertEqual
(
repr
(
u1
),
repr
(
d1
))
self
.
assertEqual
(
`u2`
,
`d2`
)
self
.
assertEqual
(
repr
(
u2
),
repr
(
d2
)
)
# Test __cmp__ and __len__
# Test __cmp__ and __len__
all
=
[
d0
,
d1
,
d2
,
u
,
u0
,
u1
,
u2
,
uu
,
uu0
,
uu1
,
uu2
]
all
=
[
d0
,
d1
,
d2
,
u
,
u0
,
u1
,
u2
,
uu
,
uu0
,
uu1
,
uu2
]
...
...
Lib/test/test_weakref.py
View file @
e741703c
...
@@ -51,10 +51,10 @@ class ReferencesTestCase(TestBase):
...
@@ -51,10 +51,10 @@ class ReferencesTestCase(TestBase):
# Live reference:
# Live reference:
o
=
C
()
o
=
C
()
wr
=
weakref
.
ref
(
o
)
wr
=
weakref
.
ref
(
o
)
`wr`
repr
(
wr
)
# Dead reference:
# Dead reference:
del
o
del
o
`wr`
repr
(
wr
)
def
test_basic_callback
(
self
):
def
test_basic_callback
(
self
):
self
.
check_basic_callback
(
C
)
self
.
check_basic_callback
(
C
)
...
...
Lib/test/tokenize_tests.txt
View file @
e741703c
...
@@ -21,7 +21,7 @@ y = [3, 4,
...
@@ -21,7 +21,7 @@ y = [3, 4,
5]
5]
z = {'a':5,
z = {'a':5,
'b':6}
'b':6}
x = (len(
`y`
) + 5*x - a[
x = (len(
repr(y)
) + 5*x - a[
3 ]
3 ]
- x + len({
- x + len({
}
}
...
...
Lib/wsgiref/headers.py
View file @
e741703c
...
@@ -140,7 +140,7 @@ class Headers:
...
@@ -140,7 +140,7 @@ class Headers:
return self._headers[:]
return self._headers[:]
def __repr__(self):
def __repr__(self):
return "
Headers
(
%
s
)
" % `self._headers`
return "
Headers
(
%
r
)
" % self._headers
def __str__(self):
def __str__(self):
"""str() returns the formatted headers, complete with end line,
"""str() returns the formatted headers, complete with end line,
...
...
Lib/wsgiref/simple_server.py
View file @
e741703c
...
@@ -169,7 +169,7 @@ def demo_app(environ,start_response):
...
@@ -169,7 +169,7 @@ def demo_app(environ,start_response):
print
>>
stdout
print
>>
stdout
h
=
environ
.
items
();
h
.
sort
()
h
=
environ
.
items
();
h
.
sort
()
for
k
,
v
in
h
:
for
k
,
v
in
h
:
print
>>
stdout
,
k
,
'='
,
`v`
print
>>
stdout
,
k
,
'='
,
repr
(
v
)
start_response
(
"200 OK"
,
[(
'Content-Type'
,
'text/plain'
)])
start_response
(
"200 OK"
,
[(
'Content-Type'
,
'text/plain'
)])
return
[
stdout
.
getvalue
()]
return
[
stdout
.
getvalue
()]
...
...
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