Skip to content
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

Fix #8255: py domain: number in defarg is changed to decimal #8278

Merged
merged 2 commits into from
Oct 5, 2020

Conversation

tk0miya
Copy link
Member

@tk0miya tk0miya commented Oct 4, 2020

Feature or Bugfix

  • Bugfix

Purpose

@tk0miya tk0miya added this to the 3.3.0 milestone Oct 4, 2020
Developers can write number literals in several ways. For example,
decimal (1234), hexadecimal (0x1234), octal decimal (0o1234) and so on.
But, AST module don't mind how the numbers written in the code. As a
result, ast.unparse() could not reproduce the original form of number
literals.

This allows to construct number literals as possible using original
source code.

Note: This is only available in Python 3.8+.
Number literals in default argument value is converted to decimal form
unexpectedly by AST module.  This fixes the signature parsing code to
recosntruct it correctly.

Note: This is only available in Python 3.8+.
@tk0miya tk0miya force-pushed the 8255_hexadecimal_default_value branch from 7db977e to cc941db Compare October 4, 2020 16:08
@tk0miya tk0miya merged commit 408ebe4 into sphinx-doc:3.x Oct 5, 2020
@tk0miya tk0miya deleted the 8255_hexadecimal_default_value branch October 5, 2020 15:47
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant