From 559e5d7f4d1155e95fb6f925c927a263f9196935 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 11 Jun 2008 18:37:52 +0000 Subject: #2630: Implement PEP 3138. The repr() of a string now contains printable Unicode characters unescaped. The new ascii() builtin can be used to get a repr() with only ASCII characters in it. PEP and patch were written by Atsuo Ishimoto. --- Objects/stringlib/stringdefs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Objects/stringlib/stringdefs.h') diff --git a/Objects/stringlib/stringdefs.h b/Objects/stringlib/stringdefs.h index bdc3a29160c..946de050320 100644 --- a/Objects/stringlib/stringdefs.h +++ b/Objects/stringlib/stringdefs.h @@ -24,5 +24,5 @@ #define STRINGLIB_CMP memcmp #define STRINGLIB_TOSTR PyObject_Str #define STRINGLIB_GROUPING _PyBytes_InsertThousandsGrouping - +#define STRINGLIB_TOASCII PyObject_Repr #endif /* !STRINGLIB_STRINGDEFS_H */ -- cgit v1.2.3