A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-March/133522.html below:

[Python-Dev] C code: %s vs %U

[Python-Dev] C code: %s vs %U [Python-Dev] C code: %s vs %UEthan Furman ethan at stoneleaf.us
Wed Mar 26 14:06:28 CET 2014
On 03/26/2014 03:48 AM, Antoine Pitrou wrote:
> On Tue, 25 Mar 2014 18:43:30 -0700
> Ethan Furman <ethan at stoneleaf.us> wrote:
>> %s is a string.
>>
>> %U is unicode?
>
> What is the context?

A patch I'm adapting has these lines:

   static PyObject*
   module_getattr(PyObject *m, PyObject *name)
   {
       char *mod_name_str;
       ...
       PyErr_Format(PyExc_AttributeError,
                   "module '%s' has no attribute '%U'", mod_name_str, name);

So it looks like %s is referring to a simple string, and %U is referring to a PyObject, but I was hoping for verification.

--
~Ethan~
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4