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

Commit 69621d1

Browse filesBrowse files
authored
gh-104018: remove unused format "z" handling in string formatfloat() (#104107)
This is a cleanup overlooked in PR #104033.
1 parent c53547c commit 69621d1
Copy full SHA for 69621d1

File tree

4 files changed

+0
-8
lines changed
Filter options

4 files changed

+0
-8
lines changed

‎Include/internal/pycore_format.h

Copy file name to clipboardExpand all lines: Include/internal/pycore_format.h
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@ extern "C" {
1414
* F_BLANK ' '
1515
* F_ALT '#'
1616
* F_ZERO '0'
17-
* F_NO_NEG_0 'z'
1817
*/
1918
#define F_LJUST (1<<0)
2019
#define F_SIGN (1<<1)
2120
#define F_BLANK (1<<2)
2221
#define F_ALT (1<<3)
2322
#define F_ZERO (1<<4)
24-
#define F_NO_NEG_0 (1<<5)
2523

2624
#ifdef __cplusplus
2725
}

‎Objects/bytesobject.c

Copy file name to clipboardExpand all lines: Objects/bytesobject.c
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,6 @@ formatfloat(PyObject *v, int flags, int prec, int type,
423423
if (flags & F_ALT) {
424424
dtoa_flags |= Py_DTSF_ALT;
425425
}
426-
if (flags & F_NO_NEG_0) {
427-
dtoa_flags |= Py_DTSF_NO_NEG_0;
428-
}
429426
p = PyOS_double_to_string(x, type, prec, dtoa_flags, NULL);
430427

431428
if (p == NULL)

‎Objects/unicodeobject.c

Copy file name to clipboardExpand all lines: Objects/unicodeobject.c
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13452,8 +13452,6 @@ formatfloat(PyObject *v, struct unicode_format_arg_t *arg,
1345213452

1345313453
if (arg->flags & F_ALT)
1345413454
dtoa_flags |= Py_DTSF_ALT;
13455-
if (arg->flags & F_NO_NEG_0)
13456-
dtoa_flags |= Py_DTSF_NO_NEG_0;
1345713455
p = PyOS_double_to_string(x, arg->ch, prec, dtoa_flags, NULL);
1345813456
if (p == NULL)
1345913457
return -1;

‎Python/ast_opt.c

Copy file name to clipboardExpand all lines: Python/ast_opt.c
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,6 @@ simple_format_arg_parse(PyObject *fmt, Py_ssize_t *ppos,
317317
case ' ': *flags |= F_BLANK; continue;
318318
case '#': *flags |= F_ALT; continue;
319319
case '0': *flags |= F_ZERO; continue;
320-
case 'z': *flags |= F_NO_NEG_0; continue;
321320
}
322321
break;
323322
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.