Skip to content

Conversation

efimov-mikhail
Copy link
Contributor

@efimov-mikhail efimov-mikhail commented Oct 8, 2025

@efimov-mikhail
Copy link
Contributor Author

CC @ericsnowcurrently

@efimov-mikhail
Copy link
Contributor Author

I've removed incorrect assertion, reorganize a little and update code comments.


// That means there must be
// an explicit return (non-None), or it only raises.
// The last instruction mostly either returns or raises.
Copy link
Contributor

Choose a reason for hiding this comment

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

What about raises? Do you need to handle it?

Copy link
Contributor Author

@efimov-mikhail efimov-mikhail Oct 8, 2025

Choose a reason for hiding this comment

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

No, raises can't change return value of a function. There was only one incorrect assumption that each function should end with either return or raise if there's no None in the list of constants. But we can preserve old checking, because we only need to find return statement.

}
// It must only raise.

none_index = -1;
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe you have to add comments here or below where you use this value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What kind of comments?

@efimov-mikhail
Copy link
Contributor Author

CC @picnixz.
Could you please add "skip news" label?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants