Skip to content

Float type: Added __doc__ #327

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

Merged
merged 1 commit into from
Feb 7, 2019
Merged

Conversation

ZapAnton
Copy link
Contributor

@ZapAnton ZapAnton commented Feb 5, 2019

No description provided.

@ZapAnton ZapAnton force-pushed the float_doc branch 2 times, most recently from 4c96c58 to 2cb8224 Compare February 5, 2019 12:45
@ZapAnton
Copy link
Contributor Author

ZapAnton commented Feb 5, 2019

@windelbouwman the cpython check fails, because of the version conflict.

I have Python 3.7, in which the float.__doc__ contains Convert a string or number to a floating point number, if possible., but the Travis check uses the Python 3.6 version in which float.__doc__ contains
float(x) -> floating point number\n\nConvert a string or number to a floating point number, if possible.

What version should be chosen here?

@mrveera
Copy link
Contributor

mrveera commented Feb 6, 2019

For most of the types __doc__ string is different from python 3.7 to 3.6
Please decide that ASAP

@windelbouwman
Copy link
Contributor

I would not test the docstrings and take the latest from python 3.7. This is probably most accurate. Note that we might choose our docstrings from being different (if this means more clear / better) than CPython. The aim of rustpython is not per se 100% compatibility with cpython.

@ZapAnton
Copy link
Contributor Author

ZapAnton commented Feb 6, 2019

@windelbouwman I will then remove the latest commit.
Would you like to remove all other __doc__ tests (e.g. for bool) in the separate PR?

@ZapAnton
Copy link
Contributor Author

ZapAnton commented Feb 6, 2019

Done

@windelbouwman
Copy link
Contributor

It would be good to remove too strict tests on doc strings such that they work on both CPython 3.7 and CPython 3.6.

@windelbouwman windelbouwman merged commit 385fb03 into RustPython:master Feb 7, 2019
@ZapAnton ZapAnton deleted the float_doc branch February 8, 2019 09:39
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.

3 participants