Lines Matching defs:format
678 arrive here as a result of using the empty format code or
697 * @format: The printf()-style format to use for the
703 * decimal point. To format the number you pass in
704 * a printf()-style format string. Allowed conversion
716 const char *format,
721 size_t format_len = strlen(format);
723 /* Issue 2264: code 'Z' requires copying the format. 'Z' is 'g', but
727 /* The last character in the format string must be the format char */
728 format_char = format[format_len - 1];
730 if (format[0] != '%')
733 /* I'm not sure why this test is here. It's ensuring that the format
737 if (strpbrk(format + 1, "'l%"))
740 /* Also curious about this function is that it accepts format strings
751 /* Map 'Z' format_char to 'g', by copying the format string and
755 /* The format won't fit in our copy. Error out. In
760 strcpy(tmp_format, format);
762 format = tmp_format;
767 PyOS_snprintf(buffer, buf_size, format, d);
801 char format[32];
825 case 'r': /* repr format */
860 for 'g' format: at most precision, except possibly
862 for 'e' format: precision+1
863 for 'f' format: precision digits after the point, at least 1
879 extra floor(exp/3) digits for 'f' format.
915 PyOS_snprintf(format, sizeof(format), "%%%s.%i%c",
918 _PyOS_ascii_formatd(buf, bufsize, format, val, precision);
991 should have ".0" added. Only applies to format codes 'r' and 'g'.
993 used. Only applies to format codes 'e', 'f' and 'g'. For code 'g',
1093 /* We got digits back, format them. We may need to pad 'digits'
1132 /* convert to exponential format at 1e16. We used to convert
1297 /* precision 0 makes no sense for 'g' format; interpret as 1 */
1302 /* repr format */