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/2008-February/076904.html below:

[Python-Dev] Calling a builtin from C code; PEP 3101 format() builtin

[Python-Dev] Calling a builtin from C code; PEP 3101 format() builtin [Python-Dev] Calling a builtin from C code; PEP 3101 format() builtinEric Smith eric+python-dev at trueblade.com
Sat Feb 16 01:18:37 CET 2008
Eric Smith wrote:
> Greg Ewing wrote:
>> Eric Smith wrote:
>>
>>> 1: exposing builtin_format(), probably giving it another name 
>>> (PyObject_Format?) and moving it somewhere other than bltinmodule.c.
>> PyObject_Format sounds more like an API for invoking the
>> __format__ lookup mechanism. Maybe something like
>> PyObject_DefaultFormat would be better.
> 
> I see it like:
> PyObject_Str(o) gives you str(o),
> PyObject_Unicode(o) gives you unicode(o)
> so
> PyObject_Format(o, spec) give you format(o, spec).
> 
> All 3 of them do things with __special__ methods.

Having heard no objections, I'm going to call this PyObject_Format and 
put it in abstract.c.

Eric.
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