]> khamidou — GitHub mirrors - imapclient.git/commitdiff
Added Address(...) and Envelope(...) namedtuples to mimic Ruby Net::IMAP::{Address...
authorNaveen Nathan <naveen@lastninja.net>
Thu, 24 Oct 2013 14:02:23 +0000 (01:02 +1100)
committerNaveen Nathan <naveen@lastninja.net>
Thu, 24 Oct 2013 14:02:23 +0000 (01:02 +1100)
imapclient/response_types.py [new file with mode: 0644]

diff --git a/imapclient/response_types.py b/imapclient/response_types.py
new file mode 100644 (file)
index 0000000..eae23fe
--- /dev/null
@@ -0,0 +1,11 @@
+# Copyright (c) 2013, Menno Smits
+# Released subject to the New BSD License
+# Please see http://en.wikipedia.org/wiki/BSD_licenses
+
+from collections import namedtuple
+
+Address = namedtuple("Address", "Name Route Mailbox Host")
+
+# note lowercase "from" is a keyword
+Envelope = namedtuple("Envelope", "Date Subject From Sender Reply_To To " + \
+                                  "Cc Bcc In_Reply_To Message_Id")