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
b81b252f
Commit
b81b252f
authored
Aug 23, 2002
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
s/_as_Temporarily_Immutable/_as_temporarily_immutable/g, because the
latter is what the code actually does.
parent
54fd3e6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Doc/lib/libsets.tex
Doc/lib/libsets.tex
+2
-2
No files found.
Doc/lib/libsets.tex
View file @
b81b252f
...
...
@@ -199,14 +199,14 @@ construct sets of sets.
A similar mechanism is needed by the
\method
{__
contains
__
()
}
and
\method
{
remove()
}
methods which need to hash an element to check
for membership in a set. Those methods check an element for hashability
and, if not, check for a
\method
{_
as
_
Temporarily
_
I
mmutable()
}
method
and, if not, check for a
\method
{_
as
_
temporarily
_
i
mmutable()
}
method
which returns the element wrapped by a class that provides temporary
methods for
\method
{__
hash
__
()
}
,
\method
{__
eq
__
()
}
, and
\method
{__
ne
__
()
}
.
The alternate mechanism spares the need to build a separate copy of
the original mutable object.
\class
{
Set
}
objects implement the
\method
{_
as
_
Temporarily
_
I
mmutable()
}
\class
{
Set
}
objects implement the
\method
{_
as
_
temporarily
_
i
mmutable()
}
method which returns the
\class
{
Set
}
object wrapped by a new class
\class
{_
TemporarilyImmutableSet
}
.
...
...
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