Py_INCREF( Py_None ); return Py_None;
Py_RETURN_NONE;
static PyObject* wpItem_getAttr( wpItem* self, char* name ){	// Special Python things	/*		\rproperty item.content A list of all items inside of the container.	*/	if ( !strcmp( "content", name ) )	{		cItem::ContainerContent content = self->pItem->content();		PyObject* list = PyList_New( content.size() );		for ( uint i = 0; i < content.size(); ++i )			PyList_SetItem( list, i, PyGetItemObject( content[i] ) );		return list;	}	/*		\property item.tags A list of all tag names the object currently has.	*/	else if ( !strcmp( "tags", name ) )	{		// Return a list with the keynames		PyObject* list = PyList_New( 0 );		QStringList tags = self->pItem->getTags();		for ( QStringList::iterator it = tags.begin(); it != tags.end(); ++it )		{			QString name = *it;			if ( !name.isEmpty() )			{				PyList_Append( list, PyString_FromString( name.latin1() ) );			}		}		return list;	}	/*		\rproperty item.objects If the item is a multi object, this is a list of objects that are within		the multi. If it's not a multi, this property is None.	*/	else if ( !strcmp( "objects", name ) )	{		cMulti* multi = dynamic_cast<cMulti*>( self->pItem );		if ( !multi )		{			Py_INCREF( Py_None );			return Py_None;		}		const QPtrList<cUObject>& objects = multi->getObjects();		PyObject* tuple = PyTuple_New( objects.count() );		QPtrList<cUObject>::const_iterator it( objects.begin() );		unsigned int i = 0;		for ( ; it != objects.end(); ++it )		{			PyTuple_SetItem( tuple, i++, ( *it )->getPyObject() );		}		return tuple;	}	/*		\rproperty item.events Returns a list of all event names the object has.	*/	else if ( !strcmp( "events", name ) )	{		QStringList events = QStringList::split( ",", self->pItem->eventList() );		PyObject* list = PyList_New( events.count() );		for ( uint i = 0; i < events.count(); ++i )			PyList_SetItem( list, i, PyString_FromString( events[i].latin1() ) );		return list;	}	else	{		cVariant result;		stError* error = self->pItem->getProperty( name, result );		if ( !error )		{			PyObject* obj = 0;			switch ( result.type() )			{			case cVariant::BaseChar:				obj = PyGetCharObject( result.toChar() );				break;			case cVariant::Item:				obj = PyGetItemObject( result.toItem() );				break;			case cVariant::Long:			case cVariant::Int:				obj = PyInt_FromLong( result.toInt() );				break;			case cVariant::String:				if ( result.toString().isNull() )					obj = PyUnicode_FromWideChar( L"", 0 );				else					obj = PyUnicode_FromUnicode( ( Py_UNICODE * ) result.toString().ucs2(), result.toString().length() );				break;			case cVariant::Double:				obj = PyFloat_FromDouble( result.toDouble() );				break;			case cVariant::Coord:				obj = PyGetCoordObject( result.toCoord() );				break;			}			if ( !obj )			{				PyErr_Format( PyExc_ValueError, "Unsupported Property Type: %s", result.typeName() );				return 0;			}			return obj;		}		else			delete error;	}	return Py_FindMethod( wpItemMethods, ( PyObject * ) self, name );}