From: Serhiy Storchaka Date: Sun, 30 Oct 2016 17:37:46 +0000 (+0200) Subject: Issue #28385: An error message when non-empty format spec is passed to X-Git-Tag: v3.6.0b3~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7984bff52a9952219a3c15b88ff6514244dd7498;p=thirdparty%2FPython%2Fcpython.git Issue #28385: An error message when non-empty format spec is passed to object.__format__ now contains the name of actual type. --- 7984bff52a9952219a3c15b88ff6514244dd7498 diff --cc Objects/typeobject.c index bfbeb40d2c7b,d65fcde25f7e..9836961bc096 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@@ -4380,25 -4318,6 +4380,18 @@@ PyDoc_STRVAR(object_subclasshook_doc "NotImplemented, the normal algorithm is used. Otherwise, it\n" "overrides the normal algorithm (and the outcome is cached).\n"); +static PyObject * +object_init_subclass(PyObject *cls, PyObject *arg) +{ + Py_RETURN_NONE; +} + +PyDoc_STRVAR(object_init_subclass_doc, +"This method is called when a class is subclassed.\n" +"\n" +"The default implementation does nothing. It may be\n" +"overridden to extend subclasses.\n"); + - /* - from PEP 3101, this code implements: - - class object: - def __format__(self, format_spec): - return format(str(self), format_spec) - */ static PyObject * object_format(PyObject *self, PyObject *args) {