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
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
> PyOb
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
> PyOb
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 bett
Eric Smith wrote:
> I see 2 approaches:
>
> 1: exposing builtin_format(), probably giving it another name
> (PyObject_Format?) and moving it somewhere other than bltinmodule.c.
>
> 2: Instead of calling the C code directly, lookup "format" in Python's
> builtins, and call it. This, I think, wou
Eric Smith schrieb:
> While implementing "".format(), I need to call the builtin format()
> function, which I've already implemented (in
> bltinmodule.c:builtin_format()). In the py3k branch, I just hardcoded
> the same functionality into "".format(), which seems like the wrong
> thing to do, giv
While implementing "".format(), I need to call the builtin format()
function, which I've already implemented (in
bltinmodule.c:builtin_format()). In the py3k branch, I just hardcoded
the same functionality into "".format(), which seems like the wrong
thing to do, given how complex the code is.
I