21
21
22
22
SEMISPACE = '; '
23
23
24
- # Regular expression that matches ` special' characters in parameters, the
24
+ # Regular expression that matches ' special' characters in parameters, the
25
25
# existence of which force quoting of the parameter value.
26
26
tspecials = re .compile (r'[ \(\)<>@,;:\\"/\[\]\?=]' )
27
27
@@ -141,7 +141,7 @@ class Message:
141
141
multipart or a message/rfc822), then the payload is a list of Message
142
142
objects, otherwise it is a string.
143
143
144
- Message objects implement part of the ` mapping' interface, which assumes
144
+ Message objects implement part of the ' mapping' interface, which assumes
145
145
there is exactly one occurrence of the header per message. Some headers
146
146
do in fact appear multiple times (e.g. Received) and for those headers,
147
147
you must use the explicit API to set or get all the headers. Not all of
@@ -597,7 +597,7 @@ def get_content_type(self):
597
597
"""Return the message's content type.
598
598
599
599
The returned string is coerced to lower case of the form
600
- ` maintype/subtype'. If there was no Content-Type header in the
600
+ ' maintype/subtype'. If there was no Content-Type header in the
601
601
message, the default type as given by get_default_type() will be
602
602
returned. Since according to RFC 2045, messages always have a default
603
603
type this will always return a value.
@@ -620,7 +620,7 @@ def get_content_type(self):
620
620
def get_content_maintype (self ):
621
621
"""Return the message's main content type.
622
622
623
- This is the ` maintype' part of the string returned by
623
+ This is the ' maintype' part of the string returned by
624
624
get_content_type().
625
625
"""
626
626
ctype = self .get_content_type ()
@@ -629,14 +629,14 @@ def get_content_maintype(self):
629
629
def get_content_subtype (self ):
630
630
"""Returns the message's sub-content type.
631
631
632
- This is the ` subtype' part of the string returned by
632
+ This is the ' subtype' part of the string returned by
633
633
get_content_type().
634
634
"""
635
635
ctype = self .get_content_type ()
636
636
return ctype .split ('/' )[1 ]
637
637
638
638
def get_default_type (self ):
639
- """Return the ` default' content type.
639
+ """Return the ' default' content type.
640
640
641
641
Most messages have a default content type of text/plain, except for
642
642
messages that are subparts of multipart/digest containers. Such
@@ -645,7 +645,7 @@ def get_default_type(self):
645
645
return self ._default_type
646
646
647
647
def set_default_type (self , ctype ):
648
- """Set the ` default' content type.
648
+ """Set the ' default' content type.
649
649
650
650
ctype should be either "text/plain" or "message/rfc822", although this
651
651
is not enforced. The default content type is not stored in the
@@ -678,8 +678,8 @@ def get_params(self, failobj=None, header='content-type', unquote=True):
678
678
"""Return the message's Content-Type parameters, as a list.
679
679
680
680
The elements of the returned list are 2-tuples of key/value pairs, as
681
- split on the ` =' sign. The left hand side of the ` =' is the key,
682
- while the right hand side is the value. If there is no ` =' sign in
681
+ split on the ' =' sign. The left hand side of the ' =' is the key,
682
+ while the right hand side is the value. If there is no ' =' sign in
683
683
the parameter the value is the empty string. The value is as
684
684
described in the get_param() method.
685
685
@@ -839,9 +839,9 @@ def get_filename(self, failobj=None):
839
839
"""Return the filename associated with the payload if present.
840
840
841
841
The filename is extracted from the Content-Disposition header's
842
- ` filename' parameter, and it is unquoted. If that header is missing
843
- the ` filename' parameter, this method falls back to looking for the
844
- ` name' parameter.
842
+ ' filename' parameter, and it is unquoted. If that header is missing
843
+ the ' filename' parameter, this method falls back to looking for the
844
+ ' name' parameter.
845
845
"""
846
846
missing = object ()
847
847
filename = self .get_param ('filename' , missing , 'content-disposition' )
@@ -854,7 +854,7 @@ def get_filename(self, failobj=None):
854
854
def get_boundary (self , failobj = None ):
855
855
"""Return the boundary associated with the payload if present.
856
856
857
- The boundary is extracted from the Content-Type header's ` boundary'
857
+ The boundary is extracted from the Content-Type header's ' boundary'
858
858
parameter, and it is unquoted.
859
859
"""
860
860
missing = object ()
0 commit comments