[Python-checkins] python/dist/src/Python bltinmodule.c, 2.312, 2.313

Neal Norwitz neal at metaslash.com
Mon Jul 19 18:37:35 CEST 2004


On Mon, Jul 19, 2004 at 09:29:20AM -0700, nascheme at users.sourceforge.net wrote:

> ! 	res = (*nb->nb_hex)(v);
> ! 	if (res && !PyString_Check(res)) {
> ! 		PyErr_Format(PyExc_TypeError,
> ! 			     "__hex__ returned non-string (type %.200s)",
> ! 			     res->ob_type->tp_name);
> ! 		Py_DECREF(res);
> ! 		return NULL;
> ! 	}
> ! 	return res;

Should hex/oct be allowed to return Unicode?

Neal


More information about the Python-checkins mailing list