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
6bf31ae0
Commit
6bf31ae0
authored
May 22, 2001
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
One more update related to the new get() and setdefault() methods on the
Message object.
parent
78920b00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
Doc/lib/librfc822.tex
Doc/lib/librfc822.tex
+6
-5
No files found.
Doc/lib/librfc822.tex
View file @
6bf31ae0
...
@@ -218,11 +218,12 @@ there is no matching header; and \code{len(\var{m})},
...
@@ -218,11 +218,12 @@ there is no matching header; and \code{len(\var{m})},
\code
{
\var
{
m
}
.get(name
\optional
{
, deafult
}
)
}
,
\code
{
\var
{
m
}
.get(name
\optional
{
, deafult
}
)
}
,
\code
{
\var
{
m
}
.has
_
key(name)
}
,
\code
{
\var
{
m
}
.keys()
}
,
\code
{
\var
{
m
}
.has
_
key(name)
}
,
\code
{
\var
{
m
}
.keys()
}
,
\code
{
\var
{
m
}
.values()
}
\code
{
\var
{
m
}
.items()
}
, and
\code
{
\var
{
m
}
.values()
}
\code
{
\var
{
m
}
.items()
}
, and
\code
{
\var
{
m
}
.setdefault(name
\optional
{
, default
}
)
}
act as expected
\code
{
\var
{
m
}
.setdefault(name
\optional
{
, default
}
)
}
act as expected,
(and consistently).
\class
{
Message
}
instances also support the
with the one difference that
\method
{
get()
}
and
\method
{
setdefault()
}
mapping writable interface
\code
{
\var
{
m
}
[name] = value
}
and
\code
{
del
use an empty string as the default value.
\class
{
Message
}
instances
\var
{
m
}
[name]
}
.
\class
{
Message
}
objects do not support the
also support the mapping writable interface
\code
{
\var
{
m
}
[name] =
\method
{
clear()
}
,
\method
{
copy()
}
,
\method
{
popitem()
}
, or
value
}
and
\code
{
del
\var
{
m
}
[name]
}
.
\class
{
Message
}
objects do not
support the
\method
{
clear()
}
,
\method
{
copy()
}
,
\method
{
popitem()
}
, or
\method
{
update()
}
methods of the mapping interface. (Support for
\method
{
update()
}
methods of the mapping interface. (Support for
\method
{
.get()
}
and
\method
{
.setdefault()
}
was only added in Python
\method
{
.get()
}
and
\method
{
.setdefault()
}
was only added in Python
2.2.)
2.2.)
...
...
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