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
6aaccc6b
Commit
6aaccc6b
authored
Jun 11, 2006
by
Neal Norwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix errors found by pychecker
parent
e588c2ba
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
8 deletions
+11
-8
Lib/bsddb/dbrecio.py
Lib/bsddb/dbrecio.py
+3
-3
Lib/bsddb/dbtables.py
Lib/bsddb/dbtables.py
+6
-0
Lib/compiler/symbols.py
Lib/compiler/symbols.py
+1
-1
Lib/compiler/transformer.py
Lib/compiler/transformer.py
+0
-2
Lib/ctypes/util.py
Lib/ctypes/util.py
+1
-2
No files found.
Lib/bsddb/dbrecio.py
View file @
6aaccc6b
...
@@ -75,7 +75,7 @@ class DBRecIO:
...
@@ -75,7 +75,7 @@ class DBRecIO:
dlen
=
newpos
-
self
.
pos
dlen
=
newpos
-
self
.
pos
r
=
self
.
db
.
get
(
key
,
txn
=
self
.
txn
,
dlen
=
dlen
,
doff
=
self
.
pos
)
r
=
self
.
db
.
get
(
self
.
key
,
txn
=
self
.
txn
,
dlen
=
dlen
,
doff
=
self
.
pos
)
self
.
pos
=
newpos
self
.
pos
=
newpos
return
r
return
r
...
@@ -121,7 +121,7 @@ class DBRecIO:
...
@@ -121,7 +121,7 @@ class DBRecIO:
"Negative size not allowed"
)
"Negative size not allowed"
)
elif
size
<
self
.
pos
:
elif
size
<
self
.
pos
:
self
.
pos
=
size
self
.
pos
=
size
self
.
db
.
put
(
key
,
""
,
txn
=
self
.
txn
,
dlen
=
self
.
len
-
size
,
doff
=
size
)
self
.
db
.
put
(
self
.
key
,
""
,
txn
=
self
.
txn
,
dlen
=
self
.
len
-
size
,
doff
=
size
)
def
write
(
self
,
s
):
def
write
(
self
,
s
):
if
self
.
closed
:
if
self
.
closed
:
...
@@ -131,7 +131,7 @@ class DBRecIO:
...
@@ -131,7 +131,7 @@ class DBRecIO:
self
.
buflist
.
append
(
'
\
0
'
*
(
self
.
pos
-
self
.
len
))
self
.
buflist
.
append
(
'
\
0
'
*
(
self
.
pos
-
self
.
len
))
self
.
len
=
self
.
pos
self
.
len
=
self
.
pos
newpos
=
self
.
pos
+
len
(
s
)
newpos
=
self
.
pos
+
len
(
s
)
self
.
db
.
put
(
key
,
s
,
txn
=
self
.
txn
,
dlen
=
len
(
s
),
doff
=
self
.
pos
)
self
.
db
.
put
(
self
.
key
,
s
,
txn
=
self
.
txn
,
dlen
=
len
(
s
),
doff
=
self
.
pos
)
self
.
pos
=
newpos
self
.
pos
=
newpos
def
writelines
(
self
,
list
):
def
writelines
(
self
,
list
):
...
...
Lib/bsddb/dbtables.py
View file @
6aaccc6b
...
@@ -32,6 +32,12 @@ except ImportError:
...
@@ -32,6 +32,12 @@ except ImportError:
# For Python 2.3
# For Python 2.3
from
bsddb.db
import
*
from
bsddb.db
import
*
# XXX(nnorwitz): is this correct? DBIncompleteError is conditional in _bsddb.c
try
:
DBIncompleteError
except
NameError
:
class
DBIncompleteError
(
Exception
):
pass
class
TableDBError
(
StandardError
):
class
TableDBError
(
StandardError
):
pass
pass
...
...
Lib/compiler/symbols.py
View file @
6aaccc6b
...
@@ -191,7 +191,7 @@ class GenExprScope(Scope):
...
@@ -191,7 +191,7 @@ class GenExprScope(Scope):
self
.
add_param
(
'[outmost-iterable]'
)
self
.
add_param
(
'[outmost-iterable]'
)
def
get_names
(
self
):
def
get_names
(
self
):
keys
=
Scope
.
get_names
()
keys
=
Scope
.
get_names
(
self
)
return
keys
return
keys
class
LambdaScope
(
FunctionScope
):
class
LambdaScope
(
FunctionScope
):
...
...
Lib/compiler/transformer.py
View file @
6aaccc6b
...
@@ -729,8 +729,6 @@ class Transformer:
...
@@ -729,8 +729,6 @@ class Transformer:
def
atom
(
self
,
nodelist
):
def
atom
(
self
,
nodelist
):
return
self
.
_atom_dispatch
[
nodelist
[
0
][
0
]](
nodelist
)
return
self
.
_atom_dispatch
[
nodelist
[
0
][
0
]](
nodelist
)
n
.
lineno
=
nodelist
[
0
][
2
]
return
n
def
atom_lpar
(
self
,
nodelist
):
def
atom_lpar
(
self
,
nodelist
):
if
nodelist
[
1
][
0
]
==
token
.
RPAR
:
if
nodelist
[
1
][
0
]
==
token
.
RPAR
:
...
...
Lib/ctypes/util.py
View file @
6aaccc6b
import
sys
,
os
import
sys
,
os
import
ctypes
# find_library(name) returns the pathname of a library, or None.
# find_library(name) returns the pathname of a library, or None.
if
os
.
name
==
"nt"
:
if
os
.
name
==
"nt"
:
...
@@ -41,7 +40,7 @@ if os.name == "posix" and sys.platform == "darwin":
...
@@ -41,7 +40,7 @@ if os.name == "posix" and sys.platform == "darwin":
elif
os
.
name
==
"posix"
:
elif
os
.
name
==
"posix"
:
# Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump
# Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump
import
re
,
tempfile
import
re
,
tempfile
,
errno
def
_findLib_gcc
(
name
):
def
_findLib_gcc
(
name
):
expr
=
'[^
\
(
\
)
\
s]*li
b
%s
\
.[^
\
(
\
)
\
s]*'
%
name
expr
=
'[^
\
(
\
)
\
s]*li
b
%s
\
.[^
\
(
\
)
\
s]*'
%
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