Skip to content

Conversation

vivekvashist
Copy link
Contributor

No description provided.

@bedevere-bot bedevere-bot added the docs Documentation in the Doc dir label Dec 14, 2021
@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

CLA Missing

Our records indicate the following people have not signed the CLA:

@vivekvashist

For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?

The parser repeats the offending line and displays a little 'arrow' pointing at
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This no longer matches the example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @iritkatriel - just checking if you need anything from my side ??

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sentence just after the example looks like it needs to be updated as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the sentence as requested - let me know if it looks good to you ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sentence below is now incorrect, it talks about a missing colon before print.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ This is still the case, requesting changes to make sure this is not missed.

@iritkatriel
Copy link
Member

@pablogsal with the irrelevant suggestion about comma, this doesn’t look like the best example to keep in the tutorial. What do you think?

@pablogsal
Copy link
Member

I agree, I would prefer also not to keep the specific errors in the docs just in case we change them in the future. Having the arrows is good, thought.

@taleinat
Copy link
Contributor

taleinat commented Jan 8, 2022

Friendly ping, @pablogsal and @iritkatriel?

@iritkatriel
Copy link
Member

@vivekvashist can you think of a better example, one that doesn’t generate an irrelevant suggestion?

@vivekvashist
Copy link
Contributor Author

@vivekvashist can you think of a better example, one that doesn’t generate an irrelevant suggestion?

Would this work ?

>>> greeting = 'Hello World'
>>> print greeting
  File "<stdin>", line 1
    print greeting
    ^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(greeting)?

@iritkatriel
Copy link
Member

I think that’s better, yes.

^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(greeting)?

The parser repeats the offending line and displays 'arrows' pointing at
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually now I see that this example doesn’t demonstrate what the text mentions - that the arrows point to where the error begins. Can we find an example where the arrows don’t cover the whole line?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually now I see that this example doesn’t demonstrate what the text mentions - that the arrows point to where the error begins. Can we find an example where the arrows don’t cover the whole line?

How about:

>>> a[1]] = 0
  File "<stdin>", line 1
    a[1]] = 0
        ^
SyntaxError: unmatched ']'

The quote used in the example is from Monty Python :)
@rhettinger
Copy link
Contributor

Closing and reopening to trigger the bots.

@rhettinger rhettinger closed this May 10, 2022
@rhettinger rhettinger reopened this May 10, 2022
^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?

The parser repeats the offending line and displays a little 'arrow' pointing at
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ This is still the case, requesting changes to make sure this is not missed.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@slateny
Copy link
Contributor

slateny commented Oct 2, 2022

@vivekvashist Would you still be interested in giving the PR a quick update per the comment above?

@vivekvashist
Copy link
Contributor Author

Apologies for the delay - just to refresh my memory what changes/updates are required ?

@slateny
Copy link
Contributor

slateny commented Oct 5, 2022

See this comment: #30097 (comment)

print('Are you suggesting that coconuts migrate?)
^
SyntaxError: unterminated string literal (detected at line 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Spurious whitespace

example, the error is detected at the function :func:`print`, since a colon
(``':'``) is missing before it. File name and line number are printed so you
example, the error is detected at the function :func:`print`, since a single quote
(``'``) is missing. Error message and line number is also printed so you
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change it to "Error message," the old sentence is perfectly fine?

Comment on lines +21 to +22
print('Are you suggesting that coconuts migrate?)
^
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The caret is not aligned with the first quote?


>>> while True print('Hello world')
>>> print('Are you suggesting that coconuts migrate?)
File "<stdin>", line 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
File "<stdin>", line 1
File "<python-input-0>", line 1

Is that not standard for the new repl?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.