diff options
| author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2014-08-15 02:06:27 +0100 |
|---|---|---|
| committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2014-08-15 02:54:10 +0100 |
| commit | 95165cef7d6157945802ffeb98d51c43fd4033e9 (patch) | |
| tree | 5da6ac59eedf02ada30f1d2a8e41fa2d40fab0c7 /psycopg/adapter_qstring.c | |
| parent | 669e7879190c80d484bba5e969c834b0b3422331 (diff) | |
| download | psycopg2-95165cef7d6157945802ffeb98d51c43fd4033e9.tar.gz | |
Dropped almost-no-op customized objects repr()
The default repr is enough: it prints <TypeName at 0xADDR> instead of
<TypeName object at 0xADDR>.
The only people being hurt by this change are the ones using doctests:
they deserve it.
Diffstat (limited to 'psycopg/adapter_qstring.c')
| -rw-r--r-- | psycopg/adapter_qstring.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/psycopg/adapter_qstring.c b/psycopg/adapter_qstring.c index 832f04b..36b0a95 100644 --- a/psycopg/adapter_qstring.c +++ b/psycopg/adapter_qstring.c @@ -242,12 +242,6 @@ qstring_new(PyTypeObject *type, PyObject *args, PyObject *kwds) return type->tp_alloc(type, 0); } -static PyObject * -qstring_repr(qstringObject *self) -{ - return PyString_FromFormat( - "<psycopg2.extensions.QuotedString object at %p>", self); -} /* object type */ @@ -263,7 +257,7 @@ PyTypeObject qstringType = { 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_compare*/ - (reprfunc)qstring_repr, /*tp_repr*/ + 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ |
