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
97076690
Commit
97076690
authored
Aug 13, 2004
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Whitespace normalization.
parent
2c494d0a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
Lib/test/test_funcattrs.py
Lib/test/test_funcattrs.py
+1
-1
Lib/test/test_new.py
Lib/test/test_new.py
+5
-5
No files found.
Lib/test/test_funcattrs.py
View file @
97076690
...
@@ -276,7 +276,7 @@ def test_func_name():
...
@@ -276,7 +276,7 @@ def test_func_name():
verify
(
f
.
func_name
==
"h"
)
verify
(
f
.
func_name
==
"h"
)
cantset
(
f
,
"func_globals"
,
1
)
cantset
(
f
,
"func_globals"
,
1
)
cantset
(
f
,
"__name__"
,
1
)
cantset
(
f
,
"__name__"
,
1
)
def
test_func_code
():
def
test_func_code
():
def
f
():
pass
def
f
():
pass
...
...
Lib/test/test_new.py
View file @
97076690
...
@@ -100,7 +100,7 @@ print 'new.code()'
...
@@ -100,7 +100,7 @@ print 'new.code()'
# Note: Jython will never have new.code()
# Note: Jython will never have new.code()
if
hasattr
(
new
,
'code'
):
if
hasattr
(
new
,
'code'
):
def
f
(
a
):
pass
def
f
(
a
):
pass
c
=
f
.
func_code
c
=
f
.
func_code
argcount
=
c
.
co_argcount
argcount
=
c
.
co_argcount
nlocals
=
c
.
co_nlocals
nlocals
=
c
.
co_nlocals
...
@@ -116,16 +116,16 @@ if hasattr(new, 'code'):
...
@@ -116,16 +116,16 @@ if hasattr(new, 'code'):
lnotab
=
c
.
co_lnotab
lnotab
=
c
.
co_lnotab
freevars
=
c
.
co_freevars
freevars
=
c
.
co_freevars
cellvars
=
c
.
co_cellvars
cellvars
=
c
.
co_cellvars
d
=
new
.
code
(
argcount
,
nlocals
,
stacksize
,
flags
,
codestring
,
d
=
new
.
code
(
argcount
,
nlocals
,
stacksize
,
flags
,
codestring
,
constants
,
names
,
varnames
,
filename
,
name
,
constants
,
names
,
varnames
,
filename
,
name
,
firstlineno
,
lnotab
,
freevars
,
cellvars
)
firstlineno
,
lnotab
,
freevars
,
cellvars
)
# test backwards-compatibility version with no freevars or cellvars
# test backwards-compatibility version with no freevars or cellvars
d
=
new
.
code
(
argcount
,
nlocals
,
stacksize
,
flags
,
codestring
,
d
=
new
.
code
(
argcount
,
nlocals
,
stacksize
,
flags
,
codestring
,
constants
,
names
,
varnames
,
filename
,
name
,
constants
,
names
,
varnames
,
filename
,
name
,
firstlineno
,
lnotab
)
firstlineno
,
lnotab
)
try
:
# this used to trigger a SystemError
try
:
# this used to trigger a SystemError
d
=
new
.
code
(
-
argcount
,
nlocals
,
stacksize
,
flags
,
codestring
,
d
=
new
.
code
(
-
argcount
,
nlocals
,
stacksize
,
flags
,
codestring
,
constants
,
names
,
varnames
,
filename
,
name
,
constants
,
names
,
varnames
,
filename
,
name
,
...
@@ -143,7 +143,7 @@ if hasattr(new, 'code'):
...
@@ -143,7 +143,7 @@ if hasattr(new, 'code'):
pass
pass
else
:
else
:
raise
TestFailed
,
"negative co_nlocals didn't trigger an exception"
raise
TestFailed
,
"negative co_nlocals didn't trigger an exception"
try
:
# this used to trigger a Py_FatalError!
try
:
# this used to trigger a Py_FatalError!
d
=
new
.
code
(
argcount
,
nlocals
,
stacksize
,
flags
,
codestring
,
d
=
new
.
code
(
argcount
,
nlocals
,
stacksize
,
flags
,
codestring
,
constants
,
(
5
,),
varnames
,
filename
,
name
,
constants
,
(
5
,),
varnames
,
filename
,
name
,
...
...
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