FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-43950: Add documentation for PEP-657 by ammaraskar · Pull Request #27047 · python/cpython · GitHub

/ cpython Public

bpo-43950: Add documentation for PEP-657 - #27047

Merged
pablogsal merged 14 commits into
python:mainfrom
colnotab:pep657-docs
Jul 13, 2021
Merged

bpo-43950: Add documentation for PEP-657#27047
pablogsal merged 14 commits into
python:mainfrom
colnotab:pep657-docs

Conversation

ammaraskar commented Jul 6, 2021
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

First pass at documenting the feature.

https://bugs.python.org/issue43950

Comment thread Doc/whatsnew/3.11.rst Outdated
Comment thread Doc/whatsnew/3.11.rst Outdated
Comment thread Doc/whatsnew/3.11.rst Outdated

Copy link
Copy Markdown
Member

@ammaraskar can we separate co_positions() from traceback stuff? I think they are two separate features, and one masking the other right now might make users miss the co_positions() API.

Comment thread Doc/reference/datamodel.rst Outdated
Comment thread Doc/whatsnew/3.11.rst Outdated

Copy link
Copy Markdown
Member

Thanks @ammaraskar for taking the first pass on documentation. I think overall it looks great!

Copy link
Copy Markdown
Member Author

@ammaraskar can we separate co_positions() from traceback stuff? I think they are two separate features, and one masking the other right now might make users miss the co_positions() API.

Added a separate section for this to make it harder to miss.

isidentical left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

Comment thread Doc/whatsnew/3.11.rst Outdated
Comment thread Doc/reference/datamodel.rst Outdated
Comment thread Doc/whatsnew/3.11.rst Outdated

Copy link
Copy Markdown
Member Author

Rebased and squashed with the CPython specific column limit removed. Hopefully the documentation conveys that you should always be prepared to handle None with the API :)

Anything else to address here?

pablogsal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Let's focus next on finishing the specialized formats so the docs are up to date with that

Copy link
Copy Markdown
Member Author

Updated the existing examples for #27037 but maybe we should put an example of a complicated arithmetic expression to show off that specialization as well?

Copy link
Copy Markdown
Member

Updated the existing examples for #27037 but maybe we should put an example of a complicated arithmetic expression to show off that specialization as well?

Yeah, I want to also prepare in a separate PR some mini tutorial/example on how to use the Python fields.

We should also document "how to read the new tracebacks", especially for the specializations. For that, we should ask the one and only @willingc for advice on what's the best way to document it and where :)

ammaraskar and others added 3 commits July 12, 2021 16:29
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>

Copy link
Copy Markdown
Member Author

Added an example for binary operations.

We should also document "how to read the new tracebacks"

Definitely, both of those sound good for follow-up docs. Maybe we can ask the overarching docs working group and specifically cc Carol in for help :)

Copy link
Copy Markdown
Member Author

Ready to go 🚀

Comment thread Doc/c-api/code.rst Outdated
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Comment thread Doc/reference/datamodel.rst Outdated
Comment on lines +1032 to +1036
- Running the interpreter with ``-X no_debug_ranges``.
- Loading a pyc file compiled while using ``-X no_debug_ranges``.
- Position tuples corresponding to artificial instructions.
- Line and column numbers that can't be represented due to
implementation specific limitations.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nice 👍

Comment thread Doc/whatsnew/3.11.rst Outdated
Comment thread Doc/whatsnew/3.11.rst
Comment thread Doc/whatsnew/3.11.rst Outdated
ammaraskar and others added 2 commits July 12, 2021 19:54
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Comment thread Doc/reference/datamodel.rst Outdated
Comment thread Doc/whatsnew/3.11.rst Outdated
Comment thread Doc/reference/datamodel.rst Outdated
Comment thread Doc/reference/datamodel.rst Outdated
Comment thread Doc/whatsnew/3.11.rst Outdated
Comment thread Doc/whatsnew/3.11.rst Outdated
pablogsal merged commit 9c3eaf8 into python:main Jul 13, 2021
ammaraskar deleted the pep657-docs branch July 13, 2021 04:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL