[issue27775] `shlex.split(None)` causes infinite loop

2016-08-16 Thread R. David Murray
R. David Murray added the comment: This is working as designed. None means read from stdin. It is already documented in a note under shlex.split, so there isn't a doc issue here either. (Aside: 'crash' means segfault, which this isn't.) You could try to recast this as a feature request, but

[issue27775] `shlex.split(None)` causes infinite loop

2016-08-16 Thread Ram Rachum
New submission from Ram Rachum: I had a code that would freeze, and after debugging I realized that a bug in my code caused `shlex.split(None)` to be called, which puts Python in an infinite loop. We probably want to do an `if not isinstance(s, ...): raise TypeError('Bla bla')` at the start o