Hello, I'm wondering what the rationale is for hash comments yielding a continuation prompt (PS2) in the interactive interpreter. I'd like to put such comments in interactive examples, but the output is hard to follow: >>> a = 5 >>> # and now for some multiplication ... >>> a * 10 50 What I would prefer can, ironically, be shown by the interactive interpreter emulator: >>> import code >>> code.interact() Python 2.3.3 (#2, May 1 2004, 06:12:12) [GCC 3.3.3 (Debian 20040401)] on linux2 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> a = 5 >>> # and now for some multiplication >>> a * 10 50 Another apparent inconsistency is that end of line comments don't behave this way: >>> a = 5 >>> a * 10 # end of line comment 50 Is there something preventing this anomaly in the interactive interpreter from being corrected? -John -- http:// ift ile.org/
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