[issue24754] argparse add_argument with action=store_true, type=bool should not crash

2015-08-03 Thread Douglas Bagnall
Douglas Bagnall added the comment: Thanks paul.j3 and r.david.murray, I see your points. What led me to this was automatically generating command line options from a Gstreamer element, mapping the Gstreamer property types to Python types. Then I special-cased the action=store_true

[issue24754] argparse add_argument with action=store_true, type=bool should not crash

2015-07-30 Thread Douglas Bagnall
New submission from Douglas Bagnall: A line like this: parser.add_argument('--hello', action=store_true, type=bool) causes a TypeError in 2.7 and 3.4: File /usr/lib/python3.4/argparse.py, line 1344, in add_argument action = action_class(**kwargs) TypeError: __init__() got

[issue12754] Add alternative random number generators

2011-08-29 Thread douglas bagnall
douglas bagnall doug...@paradise.net.nz added the comment: I am no kind of crypto expert, but from what I read, there are no known attacks on chacha8 or salsa20/12 better than brute-forcing the key, and distinguishing the stream from random or deducing state would be considered an attack

[issue12754] Add alternative random number generators

2011-08-28 Thread douglas bagnall
douglas bagnall doug...@paradise.net.nz added the comment: Earlier this year I wrote Python wrappers for a number of generators: https://github.com/douglasbagnall/riffle They are mostly cryptographic stream ciphers from the ESTREAM[1] project, but I was also interested in dSFMT[2], which

[issue12754] Add alternative random number generators

2011-08-28 Thread douglas bagnall
douglas bagnall doug...@paradise.net.nz added the comment: A bit more on the state size and period of the stream ciphers. Chacha and Salsa use 64 bytes (512 bits) of state (vs ~2.5kB for MT19937). Its counter is 64 bits, and its seed can be 320 bits (in cipher-speak, the seed is split between