Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'#' in python shell make ... until input is received #78

Closed
HyeockJinKim opened this issue Sep 11, 2019 · 1 comment
Closed

'#' in python shell make ... until input is received #78

HyeockJinKim opened this issue Sep 11, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@HyeockJinKim
Copy link
Contributor

Hyeockz:bin hyeockjinkim$ ./gpython 
Python 3.4.0 (none, unknown)
[Gpython dev]
- os/arch: darwin/amd64
- go version: go1.11.4
>>> #
... 
... 
... 
... 
... 
... 

In python shell, #, ... is printed until input is received.
Since # is single-line comment, ... should be printed only once in shell.

The output in python3 is:

Python 3.6.0 (v3.6.0:41df79263a11, Dec 22 2016, 17:23:13) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> #
... 
>>> 
@ncw ncw added the bug Something isn't working label Sep 15, 2019
ncw added a commit that referenced this issue Sep 15, 2019
Before this change, entering a comment in the REPL caused the REPL to
read the comment indefinitely effectively breaking it.

After this change the behaviour should be exactly the same as python3/
@ncw
Copy link
Collaborator

ncw commented Sep 15, 2019

Yes, this is definitely a bug!

I've created a PR to fix #79

ncw added a commit that referenced this issue Sep 15, 2019
Before this change, entering a comment in the REPL caused the REPL to
read the comment indefinitely effectively breaking it.

After this change the behaviour is the same as pypy.  The cpython
behaviour is slightly different printing a '...' after a comment line.
This is rather illogical and difficult to emulate properly.
@ncw ncw closed this as completed in 8c361a8 Sep 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants