bpo-33332: Add signal.valid_signals() by pitrou · Pull Request #6581 · python/cpython (original) (raw)
First I wanted to get a list, but then I read the PR and I like reusing existing code :-)
If someone wants an immutable type, it's very simple: frozenset(signal.valid_signals()).
An immutable type might be justified if it was a module constant, but it's a function which creates a new object at each call, so IMHO a set is just fine.
I don't want to modify other signal functions just to be pedantic. I like Antoine's rationale to use set in valid_signals().