Mercurial > cpython-lru_cache-weakref
annotate Python/formatter_string.c @ 46075:84bb7701efba legacy-trunk
Make Py3k warnings consistent w.r.t. punctuation; also respect the
EOL 80 limit and supply more alternatives in warning messages.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Tue, 25 Mar 2008 08:29:14 +0000 |
| parents | b7231bf6bfb7 |
| children | 47ef9a806ce9 |
| rev | line source |
|---|---|
|
45381
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
1 /***********************************************************************/ |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
2 /* Implements the string (as opposed to unicode) version of the |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
3 built-in formatters for string, int, float. That is, the versions |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
4 of int.__float__, etc., that take and return string objects */ |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
5 |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
6 #include "Python.h" |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
7 #include "formatter_string.h" |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
8 |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
9 #include "../Objects/stringlib/stringdefs.h" |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
10 |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
11 #define FORMAT_STRING string__format__ |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
12 #define FORMAT_LONG string_long__format__ |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
13 #define FORMAT_INT string_int__format__ |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
14 #define FORMAT_FLOAT string_float__format__ |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
15 #include "../Objects/stringlib/formatter.h" |
