This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients barry, christian.heimes, eli.bendersky, ethan.furman, gvanrossum, ncoghlan, neologix, pitrou, serhiy.storchaka
Date 2013-08-30.14:58:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAP7+vJJojnPCVkrpGcyEezVHf9hnO+5U2Xv+7CsB9eqBQ5uXcA@mail.gmail.com>
In-reply-to <1377870942.88.0.889170323179.issue18720@psf.upfronthosting.co.za>
Content
I prefer two prettier loops over one less pretty one in this case. No
opinion about _intenum_converter yet. (IMO refactoring can always be lazy,
i.e. after you have multiple copies of the same code there's time to
consider whether you should unify them and what the pros and cons are.)

On Fri, Aug 30, 2013 at 6:55 AM, Eli Bendersky <report@bugs.python.org>wrote:

>
> Eli Bendersky added the comment:
>
> [Thanks, Guido]
>
> Attaching patch with SOCK_* constants converted as well. The module
> globals are currently walked twice, once to extract AF_* and once SOCK_*.
> This is not a real performance problem, but should we fold it into a single
> loop that collects two dicts? The code will be less pretty but more
> efficient.
>
> Another issue is _intenum_converter. Ethan - do you think it belongs in
> the enum module as a helper function or something of the sort?
>
> ----------
> Added file:
> http://bugs.python.org/file31521/socket-intenum-af-type.6.patch
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue18720>
> _______________________________________
>
History
Date User Action Args
2013-08-30 14:58:46gvanrossumsetrecipients: + gvanrossum, barry, ncoghlan, pitrou, christian.heimes, eli.bendersky, neologix, ethan.furman, serhiy.storchaka
2013-08-30 14:58:46gvanrossumlinkissue18720 messages
2013-08-30 14:58:45gvanrossumcreate