Even more elegant random numbers?
Having to manually push
and pop
SeedSequences to the internal stack of the random
module promises to be a bit error-prone, because it's easy to forget the pop
operation.
What do you think about using a context manager like I'm demonstrating in a few cases in test_random.py
?
If you like it, I'll use the new construct in all places where it's appropriate.
Edited by Martin Reinecke