object_tp_as_mapping

来自「Python语言编译器」· 代码 · 共 35 行

TXT
35
字号
/* Code to access $name$ objects as mappings */static int$abbrev$_length(self)	$abbrev$object *self;{	/* XXXX Return the size of the mapping */}static PyObject *$abbrev$_subscript(self, key)	$abbrev$object *self;	PyObject *key;{	/* XXXX Return the item of self indexed by key */}static int$abbrev$_ass_sub(self, v, w)	$abbrev$object *self;	PyObject *v, *w;{	/* XXXX Put w in self under key v */	return 0;}static PyMappingMethods $abbrev$_as_mapping = {	(inquiry)$abbrev$_length,		/*mp_length*/	(binaryfunc)$abbrev$_subscript,		/*mp_subscript*/	(objobjargproc)$abbrev$_ass_sub,	/*mp_ass_subscript*/};/* -------------------------------------------------------- */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?