From: W. Trevor King Date: Sat, 19 Jan 2013 00:13:15 +0000 (-0500) Subject: feed: Remove the for loop variable `e` for a clean namespace X-Git-Tag: v3.0~19 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e7035b663fdf0792a5125e90736f99e903b2f0be;p=rss2email.git feed: Remove the for loop variable `e` for a clean namespace Otherwise: >>> import rss2email.feed >>> print([x for x in dir(rss2email) if not x.startswith('_')]) ['Feed', 'e'] which might confuse people ;). Signed-off-by: W. Trevor King --- diff --git a/rss2email/feed.py b/rss2email/feed.py index 73b182a..9a1c709 100644 --- a/rss2email/feed.py +++ b/rss2email/feed.py @@ -57,6 +57,7 @@ _SOCKET_ERRORS = [] for e in ['error', 'gaierror']: if hasattr(_socket, e): _SOCKET_ERRORS.append(getattr(_socket, e)) +del e # cleanup namespace _SOCKET_ERRORS = tuple(_SOCKET_ERRORS)