Skip to content

Conversation

amanmoon
Copy link
Contributor

@amanmoon amanmoon commented Dec 4, 2023

removed the old python2 print statment information from the developer documentation

Fixes #36807

removed the "Python3 print: Python3 syntax for print must be used in Sage code and doctests. If you use an old-style print in doctests, it will raise a SyntaxError:"
and changed it with
"In SageMath code and doctests, adhere to Python 3
syntax for the print function. Use parentheses as follows:"

...
SyntaxError: ...
- **Python3 print:** In SageMath code and doctests, adhere to Python 3
syntax for the print function. Use parentheses as follows:::
Copy link
Member

Choose a reason for hiding this comment

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

why do you need ::: there? Maybe :: should do?

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 removed the : from end of the line.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would be more in favour of removing the sentence and the doctest completely, don't you agree @dimpase? There is already so much to read and I don't think that anybody will be assuming python 2 syntax nowadays.

Copy link
Member

Choose a reason for hiding this comment

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

good idea. It's just very basic python.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mantepse & @dimpase so should i move forward with removing the whole print sentence and doctest?

Copy link
Member

Choose a reason for hiding this comment

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

yes please

@mantepse
Copy link
Contributor

mantepse commented Dec 8, 2023

@adrinospy, can you add the label "s:needs review"? (you may not have the appropriate rights, I don't know)

@amanmoon
Copy link
Contributor Author

amanmoon commented Dec 8, 2023

@adrinospy, can you add the label "s:needs review"? (you may not have the appropriate rights, I don't know)

No, no option is there to add label.

Copy link
Contributor

@mantepse mantepse left a comment

Choose a reason for hiding this comment

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

LGTM

vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 10, 2023
sagemathgh-36812: made changes to the documentaiton of developer in python3 print
    
removed the old python2 print statment information from the developer
documentation

Fixes sagemath#36807

removed the "Python3 print: Python3 syntax for print must be used in
Sage code and doctests. If you use an old-style print in doctests, it
will raise a SyntaxError:"
and changed it with
"In SageMath code and doctests, adhere to Python 3
syntax for the print function. Use parentheses as follows:"
    
URL: sagemath#36812
Reported by: Aman Moon
Reviewer(s): Aman Moon, Dima Pasechnik, Martin Rubey
@vbraun vbraun merged commit 2ec492a into sagemath:develop Dec 14, 2023
@amanmoon amanmoon deleted the document_changes branch December 15, 2023 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

developer's guide still mentions python2/3
5 participants