if( PyTuple_Size( args ) < 1 || !checkArgStr( 0 ) || ( !checkArgStr( 1 ) && !checkArgInt( 1 )  ) ) { PyErr_BadArgument(); return NULL;
if (!PyArg_ParseTuple( args, "sO:char.settag( name, value )", &key, &object )) return 0;  if (PyString_Check(object)) { self->pSock->tags().set(key, cVariant(PyString_AsString(object))); } else if (PyUnicode_Check(object)) { self->pSock->tags().set(key, cVariant(QString::fromUcs2((ushort*)PyUnicode_AsUnicode(object)))); } else if (PyInt_Check(object)) { self->pSock->tags().set(key, cVariant((int)PyInt_AsLong(object))); } else if (PyFloat_Check(object)) { self->pSock->tags().set(key, cVariant((double)PyFloat_AsDouble(object)));
static PyObject* wpSocket_settag( wpSocket* self, PyObject* args ){	if( !self->pSock )		return PyFalse;	if( PyTuple_Size( args ) < 1 || !checkArgStr( 0 ) || ( !checkArgStr( 1 ) && !checkArgInt( 1 )  ) )	{		PyErr_BadArgument();		return NULL;	}	QString key = getArgStr( 0 );	self->pSock->tags().remove( key );	if( checkArgStr( 1 ) )		self->pSock->tags().set( key, cVariant( getArgStr( 1 ) ) );	else if( checkArgInt( 1 ) )		self->pSock->tags().set( key, cVariant( (int)getArgInt( 1 ) ) );	return PyTrue;}