mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Remove Barry's love of deprecated syntax to silence warnings in the email
package, when run under -3, about using <>.
This commit is contained in:
parent
b2f49ff88d
commit
1f571c6e60
6 changed files with 13 additions and 13 deletions
|
@ -253,7 +253,7 @@ class Charset:
|
|||
Returns "base64" if self.body_encoding is BASE64.
|
||||
Returns "7bit" otherwise.
|
||||
"""
|
||||
assert self.body_encoding <> SHORTEST
|
||||
assert self.body_encoding != SHORTEST
|
||||
if self.body_encoding == QP:
|
||||
return 'quoted-printable'
|
||||
elif self.body_encoding == BASE64:
|
||||
|
@ -263,7 +263,7 @@ class Charset:
|
|||
|
||||
def convert(self, s):
|
||||
"""Convert a string from the input_codec to the output_codec."""
|
||||
if self.input_codec <> self.output_codec:
|
||||
if self.input_codec != self.output_codec:
|
||||
return unicode(s, self.input_codec).encode(self.output_codec)
|
||||
else:
|
||||
return s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue