#include "python.h" namespace python { #if 0 // Tuple::Tuple(const Tuple & obj) {{{ Tuple::Tuple(const Tuple & obj) { object = obj.object; incref(); } // }}} // Tuple(const Object & obj) {{{ Tuple::Tuple(const Object & obj) { if ( accepts( obj.ptr() ) ) { object = obj.ptr(); incref(); } else { throw Exception(); } } // }}} // Tuple::Tuple(PyObject * obj) {{{ Tuple::Tuple(PyObject * obj) { if ( accepts( obj ) ) { object = obj; incref(); } else { throw Exception(); } } // }}} // Tuple & Tuple::operator=(const Tuple & obj) {{{ Tuple & Tuple::operator=(const Tuple & obj) { if (&obj != this) { object = obj.object; incref(); } return *this; } // }}} // Tuple Tuple::operator=(PyObject * obj) {{{ Tuple Tuple::operator=(PyObject * obj) { if ( not accepts( obj ) ) { throw Exception(); } if (object != obj) { object = obj; incref(); } return *this; } // }}} // bool Tuple::accepts(PyObject * pyobj) const {{{ bool Tuple::accepts(PyObject * pyobj) const { return PyTuple_Check(pyobj); } // }}} #endif }