mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
New == syntax
This commit is contained in:
parent
4d8e859e8f
commit
bdfcfccbe5
73 changed files with 419 additions and 391 deletions
|
@ -31,7 +31,7 @@ def dumpsymtab(dict):
|
|||
def dumpvar(name, x):
|
||||
import sys
|
||||
t = type(x)
|
||||
if t = type({}):
|
||||
if t == type({}):
|
||||
print name, '= {}'
|
||||
for key in x.keys():
|
||||
item = x[key]
|
||||
|
@ -42,7 +42,7 @@ def dumpvar(name, x):
|
|||
if not printable(x):
|
||||
print '#',
|
||||
print name, '=', `x`
|
||||
elif t = type(sys):
|
||||
elif t == type(sys):
|
||||
print 'import', name, '#', x
|
||||
else:
|
||||
print '#', name, '=', x
|
||||
|
@ -58,6 +58,6 @@ def printable(x):
|
|||
if not printable(item):
|
||||
return 0
|
||||
return 1
|
||||
if x = {}:
|
||||
if x == {}:
|
||||
return 1
|
||||
return 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue