homepage

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 vajrasky
Recipients Dolda2000, benjamin.peterson, georg.brandl, r.david.murray, vajrasky, vstinner
Date 2014年10月26日.12:26:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1414326400.6.0.282185706589.issue22674@psf.upfronthosting.co.za>
In-reply-to
Content
Here is the preliminary patch. It's a thin wrapper of strsignal.
Some issues and things:
1. About Benjamin Peterson's request, what is the name of the dictionary supposed to be? Is everyone okay with Benjamin's suggestion?
2. About George Brandl's question: "Is it possible to determine the range of signal numbers?" We have a heuristic algorithm:
#ifndef NSIG
# if defined(_NSIG)
# define NSIG _NSIG /* For BSD/SysV */
# elif defined(_SIGMAX)
# define NSIG (_SIGMAX + 1) /* For QNX */
# elif defined(SIGMAX)
# define NSIG (SIGMAX + 1) /* For djgpp */
# else
# define NSIG 64 /* Use a reasonable default value */
# endif
#endif
if (sig_num < 1 || sig_num >= NSIG) {
 PyErr_SetString(PyExc_ValueError,
 "signal number out of range");
 return NULL;
}
3. For the unknown signal, what is the description should be? "Unknown signal" like c function returns or None?
4. What is the name of the function that wrap strsignal should be? I use strsignal for now. I just don't think it is appropriate.
History
Date User Action Args
2014年10月26日 12:26:40vajraskysetrecipients: + vajrasky, georg.brandl, vstinner, benjamin.peterson, r.david.murray, Dolda2000
2014年10月26日 12:26:40vajraskysetmessageid: <1414326400.6.0.282185706589.issue22674@psf.upfronthosting.co.za>
2014年10月26日 12:26:40vajraskylinkissue22674 messages
2014年10月26日 12:26:40vajraskycreate

AltStyle によって変換されたページ (->オリジナル) /