summaryrefslogtreecommitdiff
path: root/Python/graminit.c
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2001-06-19 19:07:46 +0000
committerBarry Warsaw <barry@python.org>2001-06-19 19:07:46 +0000
commit9b630a50200e44e16acfe3dee4052b3d0b0677e4 (patch)
tree9b9d9a753241e22f9bf6ff2844e9e06075fbd964 /Python/graminit.c
parente275c42c38f7a83275de027b200b39460b3ec7b7 (diff)
downloadcpython-git-9b630a50200e44e16acfe3dee4052b3d0b0677e4.tar.gz
Better support for RFC 1521 quoted-printable specification, along with
addition of interface for consistency with base64 module. Namely, encodestring(), decodestring(): New functions which accept a string object and return a string object. They just wrap the string in StringIOs and pass them to the encode() and decode() methods respectively. encodestring() accepts a default argument of quotetabs, defaulting to zero, which is passed on straight through to encode(). encode(): Fix the bug where an extra newline would always be added to the output, which prevented an idempotent roundtrip through encode->decode. Now, if the source string doesn't end in a newline, then the result string won't end in a newline. Also, extend the quotetabs argument semantics to include quoting embedded strings, which is also optional according to the RFC. test() -> main() "from quopri import *" also imports encodestring() and decodestring().
Diffstat (limited to 'Python/graminit.c')
0 files changed, 0 insertions, 0 deletions