◐ Shell
clean mode source ↗

bpo-41790: update error in documentation by koubaa · Pull Request #22242 · python/cpython

Open

koubaa

wants to merge 1 commit into

Conversation

@koubaa

@vstinner @corona10 @shihai1991 I'm sure I have the wrong issue number but wanted to propose this change to the doc. I can change the number and rebase.

@vstinner

@vstinner @corona10 @shihai1991 I'm sure I have the wrong issue number but wanted to propose this change to the doc. I can change the number and rebase.

You have the wrong issue number.

@koubaa koubaa changed the title bpo-1635741: update error in documentation bpo-41790: update error in documentation

Sep 15, 2020

@koubaa

@vstinner @corona10 @shihai1991 I'm sure I have the wrong issue number but wanted to propose this change to the doc. I can change the number and rebase.

You have the wrong issue number.

@vstinner I made a new issue in that case.

vstinner

eamanu

Choose a reason for hiding this comment

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

LGTM

@koubaa

@vstinner is anything else needed before merging this?

@koubaa

vstinner

declared. The sole exception are the type objects; since these must never be
deallocated, they are typically static :c:type:`PyTypeObject` objects.
declared. The sole exception are the type objects; they may be static
:c:type:`PyTypeObject` objects.

Choose a reason for hiding this comment

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

"The sole exception are the type objects" looks wrong to me. Almost all types in Python are allocated on the heap.

Only static types are never deallocated.

I'm not sure why these kinds of technical details are giving in an introduction. It would be better to move them to https://docs.python.org/dev/c-api/refcounting.html no?

Choose a reason for hiding this comment

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

Or at least, copied there.

Choose a reason for hiding this comment

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

Hm, I am not find the docs of PyHeapTypeObject. Maybe add those description info in it.

Choose a reason for hiding this comment

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

I'm not certain what to do with this change. The whole paragraph could be revisited, as Victor hints to. I'm not sure if this change makes things clearer for the reader.

@encukou: thoughts?

Choose a reason for hiding this comment

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

To be technically correct, it's not just types – PyModuleDef is also a PyObject* (though I assume that's for historical reasons only). But that's too much detail here.

encukou

Comment on lines +239 to +240

declared. The sole exception are the type objects; they may be static
:c:type:`PyTypeObject` objects.

Choose a reason for hiding this comment

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

Would this work?

declared. The sole exception are the type objects; they may be static
:c:type:`PyTypeObject` objects.
declared. (There are a few exceptions, like static type objects, but even those
are usually manipulated via pointers.)

@kylotan kylotan mannequin mentioned this pull request

Sep 19, 2022

iritkatriel

Choose a reason for hiding this comment

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

This has merge conflicts now.

@bedevere-bot

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.

@koubaa koubaa mannequin mentioned this pull request

Jan 12, 2024

@github-actions

This PR is stale because it has been open for 30 days with no activity.

Reviewers

@vstinner vstinner vstinner left review comments

@encukou encukou encukou left review comments

@shihai1991 shihai1991 shihai1991 left review comments

@erlend-aasland erlend-aasland erlend-aasland left review comments

@iritkatriel iritkatriel iritkatriel requested changes

+1 more reviewer

@eamanu eamanu eamanu approved these changes

Reviewers whose approvals may not affect merge requirements

Labels