diff options
author | Barry Warsaw <barry@python.org> | 2001-07-16 20:40:35 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2001-07-16 20:40:35 (GMT) |
commit | 9ec58aaef2d0124bd42e30e6029fe8a7bdb906e7 (patch) | |
tree | e688018560ec8fafbcaf10e8eafc1bbaa2887f16 /Lib/pickle.py | |
parent | 84c10b13bbeaccf154ad42aaa95e9d67e45ca821 (diff) | |
download | cpython-9ec58aaef2d0124bd42e30e6029fe8a7bdb906e7.zip cpython-9ec58aaef2d0124bd42e30e6029fe8a7bdb906e7.tar.gz cpython-9ec58aaef2d0124bd42e30e6029fe8a7bdb906e7.tar.bz2 |
Fix address parsing to be RFC 2822 conformant. Specifically, dots are
now allowed in unquoted RealName areas (technically, they are defined
as "obsolete syntax" we MUST accept in phrases, as part of the
obs-phrase production). Thus, parsing
To: User J. Person <person@dom.ain>
correctly returns "User J. Person" as the RealName.
AddrlistClass.__init__(): Add definition of self.phraseends which is
just self.atomends with `.' removed.
getatom(): Add an optional argument `atomends' which, if None (the
default) means use self.atomends.
getphraselist(): Pass self.phraseends to getatom() and break out of
the loop only when the current character is in phraseends instead of
atomends. This allows dots to continue to serve as atom delimiters in
all contexts except phrases.
Also, loads of docstring updates to document RFC 2822 conformance
(sorry, this should have been two separate patches).
Diffstat (limited to 'Lib/pickle.py')
0 files changed, 0 insertions, 0 deletions