Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BTrees
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
BTrees
Commits
1c5fb3c2
Commit
1c5fb3c2
authored
Nov 14, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't mask the 'set' builtin.
parent
7408ed7a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
BTrees/_base.py
BTrees/_base.py
+7
-7
BTrees/tests/test__base.py
BTrees/tests/test__base.py
+7
-0
No files found.
BTrees/_base.py
View file @
1c5fb3c2
...
@@ -147,20 +147,20 @@ class _BucketBase(_Base):
...
@@ -147,20 +147,20 @@ class _BucketBase(_Base):
class
_SetIteration
(
object
):
class
_SetIteration
(
object
):
def
__init__
(
self
,
set
,
useValues
=
False
,
default
=
None
):
def
__init__
(
self
,
to_iterate
,
useValues
=
False
,
default
=
None
):
if
set
is
None
:
if
to_iterate
is
None
:
set
=
()
to_iterate
=
()
self
.
set
=
set
self
.
to_iterate
=
to_iterate
if
useValues
:
if
useValues
:
try
:
try
:
itmeth
=
set
.
iteritems
itmeth
=
to_iterate
.
iteritems
except
AttributeError
:
except
AttributeError
:
itmeth
=
set
.
__iter__
itmeth
=
to_iterate
.
__iter__
useValues
=
False
useValues
=
False
else
:
else
:
self
.
value
=
None
self
.
value
=
None
else
:
else
:
itmeth
=
set
.
__iter__
itmeth
=
to_iterate
.
__iter__
self
.
useValues
=
useValues
self
.
useValues
=
useValues
self
.
_next
=
itmeth
().
next
self
.
_next
=
itmeth
().
next
...
...
BTrees/tests/test__base.py
View file @
1c5fb3c2
...
@@ -14,6 +14,13 @@
...
@@ -14,6 +14,13 @@
import
unittest
import
unittest
def
_assertRaises
(
self
,
e_type
,
checked
,
*
args
,
**
kw
):
try
:
checked
(
*
args
,
**
kw
)
except
e_type
as
e
:
return
e
self
.
fail
(
"Didn't raise: %s"
%
e_type
.
__name__
)
class
Test_BucketBase
(
unittest
.
TestCase
):
class
Test_BucketBase
(
unittest
.
TestCase
):
...
...
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