Turn signal.SIG* constants into enums

In Python 3.4 some module constants were turned into enums. The affected modules were socket (AF_INET*, SOCK_*) and pslistlib (FMT_*). For 3.5 there's a plan to do the same thing for ssl's PROTOCOL_* constants: http://bugs.python.org/issue21068 To me signal module looks like another good candidate which could benefit from this. Here's a real world example: http://docs.python.org/dev/library/asyncio-eventloop.html#example-set-signal... Thoughts? -- Giampaolo - http://grodola.blogspot.com

SGTM. On Mar 26, 2014 7:38 AM, "Giampaolo Rodola'" <g.rodola@gmail.com> wrote:
In Python 3.4 some module constants were turned into enums. The affected modules were socket (AF_INET*, SOCK_*) and pslistlib (FMT_*). For 3.5 there's a plan to do the same thing for ssl's PROTOCOL_* constants: http://bugs.python.org/issue21068 To me signal module looks like another good candidate which could benefit from this. Here's a real world example:
http://docs.python.org/dev/library/asyncio-eventloop.html#example-set-signal...
Thoughts?
-- Giampaolo - http://grodola.blogspot.com
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Here's a patch: http://bugs.python.org/issue21076 On Wed, Mar 26, 2014 at 4:37 PM, Guido van Rossum <guido@python.org> wrote:
SGTM. On Mar 26, 2014 7:38 AM, "Giampaolo Rodola'" <g.rodola@gmail.com> wrote:
In Python 3.4 some module constants were turned into enums. The affected modules were socket (AF_INET*, SOCK_*) and pslistlib (FMT_*). For 3.5 there's a plan to do the same thing for ssl's PROTOCOL_* constants: http://bugs.python.org/issue21068 To me signal module looks like another good candidate which could benefit from this. Here's a real world example:
http://docs.python.org/dev/library/asyncio-eventloop.html#example-set-signal...
Thoughts?
-- Giampaolo - http://grodola.blogspot.com
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
-- Giampaolo - http://grodola.blogspot.com
participants (2)
-
Giampaolo Rodola'
-
Guido van Rossum