[tor-commits] [bridgedb/develop] Update module attribute docstrings in bridgedb.parse.addr.
isis at torproject.org
isis at torproject.org
Wed Apr 23 05:23:12 UTC 2014
commit 451289fa36d6ea48c55e42f66e0bd63563535f6d
Author: Isis Lovecruft <isis at torproject.org>
Date: Tue Apr 22 23:15:41 2014 +0000
Update module attribute docstrings in bridgedb.parse.addr.
---
lib/bridgedb/parse/addr.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lib/bridgedb/parse/addr.py b/lib/bridgedb/parse/addr.py
index a9c62cc..26632ac 100644
--- a/lib/bridgedb/parse/addr.py
+++ b/lib/bridgedb/parse/addr.py
@@ -184,15 +184,17 @@ import ipaddr
#: These are the special characters which RFC2822 allows within email addresses:
-#ASPECIAL = '!#$%&*+-/=?^_`{|}~' + "\\\'"
-#: These are the ones we're pretty sure we can handle right:
+#: ASPECIAL = '!#$%&*+-/=?^_`{|}~' + "\\\'"
+#: â¦But these are the only ones we're confident that we can handle correctly:
+#: ASPECIAL = '-_+/=_~'
ASPECIAL = '-_+/=_~'
ACHAR = r'[\w%s]' % "".join("\\%s" % c for c in ASPECIAL)
DOTATOM = r'%s+(?:\.%s+)*' % (ACHAR, ACHAR)
DOMAIN = r'\w+(?:\.\w+)*'
ADDRSPEC = r'(%s)\@(%s)' % (DOTATOM, DOMAIN)
+# A compiled regexp which matches on any type and ammount of whitespace:
SPACE_PAT = re.compile(r'\s+')
-#: A compiled regex with matches RFC2822 email address strings:
+# A compiled regexp which matches RFC2822 email address strings:
ADDRSPEC_PAT = re.compile(ADDRSPEC)
More information about the tor-commits
mailing list