Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
463c5a86
Kaydet (Commit)
463c5a86
authored
Agu 19, 2003
tarafından
Barry Warsaw
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Update get_param() description to reflect changes to the docstring.
üst
c86c24e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
emailmessage.tex
Doc/lib/emailmessage.tex
+8
-5
No files found.
Doc/lib/emailmessage.tex
Dosyayı görüntüle @
463c5a86
...
...
@@ -354,15 +354,18 @@ instead of \mailheader{Content-Type}.
Parameter keys are always compared case insensitively. The return
value can either be a string, or a 3-tuple if the parameter was
\rfc
{
2231
}
encoded. When it's a 3-tuple, the elements of the value are of
the form
\code
{
(CHARSET, LANGUAGE, VALUE)
}
, where
\code
{
LANGUAGE
}
may
be the empty string. Your application should be prepared to deal with
3-tuple return values, which it can convert to a Unicode string like
so:
the form
\code
{
(CHARSET, LANGUAGE, VALUE)
}
. Note that both
\code
{
CHARSET
}
and
\code
{
LANGUAGE
}
can be
\code
{
None
}
, in which case you should consider
\code
{
VALUE
}
to be encoded in the
\code
{
us-ascii
}
charset. You can
usually ignore
\code
{
LANGUAGE
}
.
Your application should be prepared to deal with 3-tuple return
values, and can convert the parameter to a Unicode string like so:
\begin{verbatim}
param = msg.get
_
param('foo')
if isinstance(param, tuple):
param = unicode(param[2], param[0])
param = unicode(param[2], param[0]
or 'us-ascii'
)
\end{verbatim}
In any case, the parameter value (either the returned string, or the
...
...
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