Skip to content

Conversation

@StanFromIreland
Copy link
Member

@StanFromIreland StanFromIreland commented Oct 17, 2025

@vstinner
Copy link
Member

@StanFromIreland StanFromIreland requested a review from vstinner

I don't know these Unicode properties. The PR documentation doesn't help me:

Return True if the character has the XID_Start property

What does it mean XID_Start?

@StanFromIreland
Copy link
Member Author

Ah no worries then. You can find their documentation in this report, I can add a link to it in the docs.

@vstinner
Copy link
Member

In short, these functions check if a character is an identifier start or an identifier character according to Unicode TR31?

@StanFromIreland
Copy link
Member Author

Yes.

Copy link
Member

@malemburg malemburg left a comment

Choose a reason for hiding this comment

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

LGTM now

@StanFromIreland
Copy link
Member Author

I have made the requested changes; please review again

@bedevere-app
Copy link

bedevere-app bot commented Oct 29, 2025

Thanks for making the requested changes!

@malemburg: please review the changes made to this pull request.

@bedevere-app bedevere-app bot requested a review from malemburg October 29, 2025 16:52
Copy link
Member

@malemburg malemburg left a comment

Choose a reason for hiding this comment

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

Thanks, @StanFromIreland
This looks pretty complete now.

@StanFromIreland
Copy link
Member Author

Thanks for the reviews!

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

The change is correct, but I'm not convinced that we have to expose this feature in Python. It seems to be an Unicode feature which rarely used.

@malemburg
Copy link
Member

Have a look at https://peps.python.org/pep-3131/ for why these are important to have.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

About function names, the Unicode annex has also ID_Start and ID_Continue. The XID is a variant. Maybe we should keep x in the function names?

@StanFromIreland
Copy link
Member Author

StanFromIreland commented Oct 29, 2025

About function names, the Unicode annex has also ID_Start and ID_Continue.

Note that they explicitly recommend the "X" variants.

@malemburg
Copy link
Member

Maybe we should keep x in the function names?

You have a point there. Let's keep the "x" in "xid" for the functions to not cause confusion.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM

@vstinner vstinner enabled auto-merge (squash) October 30, 2025 09:53
@vstinner vstinner merged commit dbe3950 into python:main Oct 30, 2025
46 checks passed
@StanFromIreland StanFromIreland deleted the startcontinueid branch October 30, 2025 10:21
@StanFromIreland
Copy link
Member Author

Thanks for merging!

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