Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-104018: remove unused format "z" handling in string formatfloat() #104107

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

Merged
merged 1 commit into from
May 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions 2 Include/internal/pycore_format.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ extern "C" {
* F_BLANK ' '
* F_ALT '#'
* F_ZERO '0'
* F_NO_NEG_0 'z'
*/
#define F_LJUST (1<<0)
#define F_SIGN (1<<1)
#define F_BLANK (1<<2)
#define F_ALT (1<<3)
#define F_ZERO (1<<4)
#define F_NO_NEG_0 (1<<5)

#ifdef __cplusplus
}
Expand Down
3 changes: 0 additions & 3 deletions 3 Objects/bytesobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,6 @@ formatfloat(PyObject *v, int flags, int prec, int type,
if (flags & F_ALT) {
dtoa_flags |= Py_DTSF_ALT;
}
if (flags & F_NO_NEG_0) {
dtoa_flags |= Py_DTSF_NO_NEG_0;
}
p = PyOS_double_to_string(x, type, prec, dtoa_flags, NULL);

if (p == NULL)
Expand Down
2 changes: 0 additions & 2 deletions 2 Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -13452,8 +13452,6 @@ formatfloat(PyObject *v, struct unicode_format_arg_t *arg,

if (arg->flags & F_ALT)
dtoa_flags |= Py_DTSF_ALT;
if (arg->flags & F_NO_NEG_0)
dtoa_flags |= Py_DTSF_NO_NEG_0;
p = PyOS_double_to_string(x, arg->ch, prec, dtoa_flags, NULL);
if (p == NULL)
return -1;
Expand Down
1 change: 0 additions & 1 deletion 1 Python/ast_opt.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ simple_format_arg_parse(PyObject *fmt, Py_ssize_t *ppos,
case ' ': *flags |= F_BLANK; continue;
case '#': *flags |= F_ALT; continue;
case '0': *flags |= F_ZERO; continue;
case 'z': *flags |= F_NO_NEG_0; continue;
}
break;
}
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.