@@ -1943,7 +1943,7 @@ normalize_timestamp_format(const wchar_t *value)
19431943 return L"us" ;
19441944 }
19451945 if (wcscmp (value , L"0" ) == 0 ) {
1946- /* Treat "0" as empty string to disable the feature */
1946+ /* "0" means disable the feature. */
19471947 return L"" ;
19481948 }
19491949 return value ;
@@ -1963,7 +1963,8 @@ config_init_traceback_timestamps(PyConfig *config)
19631963 /* For environment variables, silently ignore invalid values */
19641964 if (is_valid_timestamp_format (wenv )) {
19651965 const wchar_t * normalized = normalize_timestamp_format (wenv );
1966- PyStatus status = PyConfig_SetString (config , & config -> traceback_timestamps , normalized );
1966+ PyStatus status = PyConfig_SetString (
1967+ config , & config -> traceback_timestamps , normalized );
19671968 PyMem_RawFree (wenv );
19681969 if (_PyStatus_EXCEPTION (status )) {
19691970 return status ;
@@ -1974,21 +1975,24 @@ config_init_traceback_timestamps(PyConfig *config)
19741975 }
19751976
19761977 /* -X option overrides environment variable */
1977- const wchar_t * xoption = config_get_xoption_value (config , L"traceback_timestamps" );
1978+ const wchar_t * xoption = config_get_xoption_value (
1979+ config , L"traceback_timestamps" );
19781980 if (xoption != NULL ) {
1979- /* If value is empty ( just -X traceback_timestamps with no =) , use "us" as default */
1981+ /* If just -X traceback_timestamps with no =, use "us" as default */
19801982 const wchar_t * value = (* xoption != '\0' ) ? xoption : L"us" ;
19811983
19821984 /* Validate command line option values, error out if invalid */
19831985 if (is_valid_timestamp_format (value )) {
19841986 const wchar_t * normalized = normalize_timestamp_format (value );
1985- PyStatus status = PyConfig_SetString (config , & config -> traceback_timestamps , normalized );
1987+ PyStatus status = PyConfig_SetString (
1988+ config , & config -> traceback_timestamps , normalized );
19861989 if (_PyStatus_EXCEPTION (status )) {
19871990 return status ;
19881991 }
19891992 } else {
1990- return PyStatus_Error ("Invalid value for -X traceback_timestamps option. "
1991- "Valid values are: us, ns, iso, 0, 1 or empty." );
1993+ return PyStatus_Error (
1994+ "Invalid -X traceback_timestamps=value option. Valid "
1995+ "values are: us, ns, iso, 0, 1 or empty." );
19921996 }
19931997 }
19941998
0 commit comments