[Python-3000-checkins] r51591 - in python/branches/p3yk/Lib: idlelib/EditorWindow.py idlelib/HyperParser.py plat-mac/aetypes.py test/list_tests.py test/test_doctest.py test/test_grammar.py test/test_mutants.py test/test_site.py test/test_userdict.py test/test_weakref.py test/tokenize_tests.txt wsgiref/headers.py wsgiref/simple_server.py
brett.cannon
python-3000-checkins at python.org
Fri Aug 25 05:00:01 CEST 2006
Author: brett.cannon
Date: Fri Aug 25 04:59:59 2006
New Revision: 51591
Modified:
python/branches/p3yk/Lib/idlelib/EditorWindow.py
python/branches/p3yk/Lib/idlelib/HyperParser.py
python/branches/p3yk/Lib/plat-mac/aetypes.py
python/branches/p3yk/Lib/test/list_tests.py
python/branches/p3yk/Lib/test/test_doctest.py
python/branches/p3yk/Lib/test/test_grammar.py
python/branches/p3yk/Lib/test/test_mutants.py
python/branches/p3yk/Lib/test/test_site.py
python/branches/p3yk/Lib/test/test_userdict.py
python/branches/p3yk/Lib/test/test_weakref.py
python/branches/p3yk/Lib/test/tokenize_tests.txt
python/branches/p3yk/Lib/wsgiref/headers.py
python/branches/p3yk/Lib/wsgiref/simple_server.py
Log:
Remove usage of backticks.
Modified: python/branches/p3yk/Lib/idlelib/EditorWindow.py
==============================================================================
--- python/branches/p3yk/Lib/idlelib/EditorWindow.py (original)
+++ python/branches/p3yk/Lib/idlelib/EditorWindow.py Fri Aug 25 04:59:59 2006
@@ -1138,7 +1138,7 @@
if not self.context_use_ps1:
for context in self.num_context_lines:
startat = max(lno - context, 1)
- startatindex = `startat` + ".0"
+ startatindex = repr(startat) + ".0"
rawtext = text.get(startatindex, "insert")
y.set_str(rawtext)
bod = y.find_good_parse_start(
Modified: python/branches/p3yk/Lib/idlelib/HyperParser.py
==============================================================================
--- python/branches/p3yk/Lib/idlelib/HyperParser.py (original)
+++ python/branches/p3yk/Lib/idlelib/HyperParser.py Fri Aug 25 04:59:59 2006
@@ -31,7 +31,7 @@
if not editwin.context_use_ps1:
for context in editwin.num_context_lines:
startat = max(lno - context, 1)
- startatindex = `startat` + ".0"
+ startatindex = repr(startat) + ".0"
stopatindex = "%d.end" % lno
# 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
Modified: python/branches/p3yk/Lib/plat-mac/aetypes.py
==============================================================================
--- python/branches/p3yk/Lib/plat-mac/aetypes.py (original)
+++ python/branches/p3yk/Lib/plat-mac/aetypes.py Fri Aug 25 04:59:59 2006
@@ -128,7 +128,7 @@
self.keyword = "%-4.4s" % str(keyword)
def __repr__(self):
- return "Keyword(%r)" % `self.keyword`
+ return "Keyword(%r)" % self.keyword
def __str__(self):
return string.strip(self.keyword)
Modified: python/branches/p3yk/Lib/test/list_tests.py
==============================================================================
--- python/branches/p3yk/Lib/test/list_tests.py (original)
+++ python/branches/p3yk/Lib/test/list_tests.py Fri Aug 25 04:59:59 2006
@@ -37,7 +37,7 @@
self.assertEqual(str(a0), str(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(repr(a2), "[0, 1, 2]")
Modified: python/branches/p3yk/Lib/test/test_doctest.py
==============================================================================
--- python/branches/p3yk/Lib/test/test_doctest.py (original)
+++ python/branches/p3yk/Lib/test/test_doctest.py Fri Aug 25 04:59:59 2006
@@ -605,7 +605,7 @@
... if isinstance(piece, doctest.Example):
... print 'Example:', (piece.source, piece.want, piece.lineno)
... else:
- ... print ' Text:', `piece`
+ ... print ' Text:', repr(piece)
Text: '\n'
Example: ('x, y = 2, 3 # no output expected\n', '', 1)
Text: ''
Modified: python/branches/p3yk/Lib/test/test_grammar.py
==============================================================================
--- python/branches/p3yk/Lib/test/test_grammar.py (original)
+++ python/branches/p3yk/Lib/test/test_grammar.py Fri Aug 25 04:59:59 2006
@@ -685,7 +685,7 @@
print 'atoms'
-### atom: '(' [testlist] ')' | '[' [testlist] ']' | '{' [dictmaker] '}' | '`' testlist '`' | NAME | NUMBER | STRING
+### atom: '(' [testlist] ')' | '[' [testlist] ']' | '{' [dictmaker] '}' | NAME | NUMBER | STRING
### dictmaker: test ':' test (',' test ':' test)* [',']
x = (1)
@@ -706,8 +706,6 @@
x = {'one': 1, 'two': 2,}
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 = 123
Modified: python/branches/p3yk/Lib/test/test_mutants.py
==============================================================================
--- python/branches/p3yk/Lib/test/test_mutants.py (original)
+++ python/branches/p3yk/Lib/test/test_mutants.py Fri Aug 25 04:59:59 2006
@@ -209,7 +209,7 @@
# Tim sez: "luck of the draw; crashes with or without for me."
print >> f
- return `"machiavelli"`
+ return repr("machiavelli")
def __hash__(self):
return 0
Modified: python/branches/p3yk/Lib/test/test_site.py
==============================================================================
--- python/branches/p3yk/Lib/test/test_site.py (original)
+++ python/branches/p3yk/Lib/test/test_site.py Fri Aug 25 04:59:59 2006
@@ -164,7 +164,7 @@
site.abs__file__()
for module in (sys, os, __builtin__):
try:
- self.failUnless(os.path.isabs(module.__file__), `module`)
+ self.failUnless(os.path.isabs(module.__file__), repr(module))
except AttributeError:
continue
# We could try everything in sys.modules; however, when regrtest.py
Modified: python/branches/p3yk/Lib/test/test_userdict.py
==============================================================================
--- python/branches/p3yk/Lib/test/test_userdict.py (original)
+++ python/branches/p3yk/Lib/test/test_userdict.py Fri Aug 25 04:59:59 2006
@@ -46,7 +46,7 @@
# Test __repr__
self.assertEqual(str(u0), str(d0))
self.assertEqual(repr(u1), repr(d1))
- self.assertEqual(`u2`, `d2`)
+ self.assertEqual(repr(u2), repr(d2))
# Test __cmp__ and __len__
all = [d0, d1, d2, u, u0, u1, u2, uu, uu0, uu1, uu2]
Modified: python/branches/p3yk/Lib/test/test_weakref.py
==============================================================================
--- python/branches/p3yk/Lib/test/test_weakref.py (original)
+++ python/branches/p3yk/Lib/test/test_weakref.py Fri Aug 25 04:59:59 2006
@@ -51,10 +51,10 @@
# Live reference:
o = C()
wr = weakref.ref(o)
- `wr`
+ repr(wr)
# Dead reference:
del o
- `wr`
+ repr(wr)
def test_basic_callback(self):
self.check_basic_callback(C)
Modified: python/branches/p3yk/Lib/test/tokenize_tests.txt
==============================================================================
--- python/branches/p3yk/Lib/test/tokenize_tests.txt (original)
+++ python/branches/p3yk/Lib/test/tokenize_tests.txt Fri Aug 25 04:59:59 2006
@@ -21,7 +21,7 @@
5]
z = {'a':5,
'b':6}
-x = (len(`y`) + 5*x - a[
+x = (len(repr(y)) + 5*x - a[
3 ]
- x + len({
}
Modified: python/branches/p3yk/Lib/wsgiref/headers.py
==============================================================================
--- python/branches/p3yk/Lib/wsgiref/headers.py (original)
+++ python/branches/p3yk/Lib/wsgiref/headers.py Fri Aug 25 04:59:59 2006
@@ -140,7 +140,7 @@
return self._headers[:]
def __repr__(self):
- return "Headers(%s)" % `self._headers`
+ return "Headers(%r)" % self._headers
def __str__(self):
"""str() returns the formatted headers, complete with end line,
Modified: python/branches/p3yk/Lib/wsgiref/simple_server.py
==============================================================================
--- python/branches/p3yk/Lib/wsgiref/simple_server.py (original)
+++ python/branches/p3yk/Lib/wsgiref/simple_server.py Fri Aug 25 04:59:59 2006
@@ -169,7 +169,7 @@
print >>stdout
h = environ.items(); h.sort()
for k,v in h:
- print >>stdout, k,'=',`v`
+ print >>stdout, k,'=',repr(v)
start_response("200 OK", [('Content-Type','text/plain')])
return [stdout.getvalue()]
More information about the Python-3000-checkins
mailing list