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.

Eric.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to