Samuele Pedroni <pedronis@bluewin.ch> writes: > 1) > > Python 2.3b1 (#40, Apr 25 2003, 19:06:24) [MSC v.1200 32 bit (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> import codeop > >>> codeop.compile_command("",symbol="eval") > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "s:\transit\py23\lib\codeop.py", line 129, in compile_command > return _maybe_compile(_compile, source, filename, symbol) > File "s:\transit\py23\lib\codeop.py", line 106, in _maybe_compile > raise SyntaxError, err1 > File "<input>", line 1 > pass > ^ > SyntaxError: invalid syntax > > > the error is basically an artifact of the logic that enforces: > > compile_command("",symbol="single") === compile_command("pass",symbol="single") > > (this makes typing enter immediately after the prompt at a simulated > shell a nop as expected) > > I would expect > > compile_command("",symbol="eval") > > to return None, i.e. to simply signal an incomplete expression (that > is what would happen if the code for "eval" case would avoid the cited > logic). OK, but I think you should preserve the existing behaviour for symbol="single". Cheers, M. -- I also feel it essential to note, [...], that Description Logics, non-Monotonic Logics, Default Logics and Circumscription Logics can all collectively go suck a cow. Thank you. -- http://advogato.org/person/Johnath/diary.html?start=4
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4