Mark Dickinson <dicki...@gmail.com> added the comment: If someone does want to produce a patch, here's the grammar that I suggest, in pseudo BNF form. This would be reasonably simple to implement, and is also simple to describe.
whitespace = ' ' | '\t' | '\n' | '\v' | '\f' # include other non-ASCII whitespace? binop = [whitespace] ('+' | '-') [whitespace] imag_marker = 'j' | 'J' complex_string = float_string binop float_string imag_marker | float_string imag_marker | float_string padded_complex_string = [whitespace] complex_string [whitespace] complex_constructor_input = padded_complex_string | [whitespace] '(' padded_complex_string ')' [whitespace] where float_string is any string that (a) doesn't contain leading or trailing whitespace, and (b) is accepted by the current float constructor. This would allow (a) and (f) in the previous message, but not (b) or (c). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9574> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com