Changes to long and float by Jeffrey Jasskin to conform to PEP 3141.
In particular, add trivial implementations of .real, .imag and .conjugate()
to both, and add .numerator and .denominator to long.
Also some small optimizations (e.g. remove long_pos in favor of long_long).
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index f2f53ba..bf65541 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -742,17 +742,6 @@
 }
 
 static PyObject *
-float_pos(PyFloatObject *v)
-{
-	if (PyFloat_CheckExact(v)) {
-		Py_INCREF(v);
-		return (PyObject *)v;
-	}
-	else
-		return PyFloat_FromDouble(v->ob_fval);
-}
-
-static PyObject *
 float_abs(PyFloatObject *v)
 {
 	return PyFloat_FromDouble(fabs(v->ob_fval));
@@ -989,7 +978,15 @@
 "Overrides the automatic determination of C-level floating point type.\n"
 "This affects how floats are converted to and from binary strings.");
 
+static PyObject *
+float_getzero(PyObject *v, void *closure)
+{
+	return PyFloat_FromDouble(0.0);
+}
+
 static PyMethodDef float_methods[] = {
+  	{"conjugate",	(PyCFunction)float_float,	METH_NOARGS,
+	 "Returns self, the complex conjugate of any float."},
 	{"__getnewargs__",	(PyCFunction)float_getnewargs,	METH_NOARGS},
 	{"__getformat__",	(PyCFunction)float_getformat,	
 	 METH_O|METH_CLASS,		float_getformat_doc},
@@ -998,6 +995,18 @@
 	{NULL,		NULL}		/* sentinel */
 };
 
+static PyGetSetDef float_getset[] = {
+    {"real", 
+     (getter)float_float, (setter)NULL,
+     "the real part of a complex number",
+     NULL},
+    {"imag", 
+     (getter)float_getzero, (setter)NULL,
+     "the imaginary part of a complex number",
+     NULL},
+    {NULL}  /* Sentinel */
+};
+
 PyDoc_STRVAR(float_doc,
 "float(x) -> floating point number\n\
 \n\
@@ -1012,7 +1021,7 @@
 	float_divmod, 	/*nb_divmod*/
 	float_pow, 	/*nb_power*/
 	(unaryfunc)float_neg, /*nb_negative*/
-	(unaryfunc)float_pos, /*nb_positive*/
+	(unaryfunc)float_float, /*nb_positive*/
 	(unaryfunc)float_abs, /*nb_absolute*/
 	(inquiry)float_bool, /*nb_bool*/
 	0,		/*nb_invert*/
@@ -1073,7 +1082,7 @@
 	0,					/* tp_iternext */
 	float_methods,				/* tp_methods */
 	0,					/* tp_members */
-	0,					/* tp_getset */
+	float_getset,				/* tp_getset */
 	0,					/* tp_base */
 	0,					/* tp_dict */
 	0,					/* tp_descr_get */