日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問(wèn)題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
創(chuàng)新互聯(lián)Python教程:弱引用對(duì)象

弱引用對(duì)象

python 支持 “弱引用” 作為一類對(duì)象。具體來(lái)說(shuō),有兩種直接實(shí)現(xiàn)弱引用的對(duì)象。第一種就是簡(jiǎn)單的引用對(duì)象,第二種盡可能地作用為一個(gè)原對(duì)象的代理。

創(chuàng)新互聯(lián)主營(yíng)晉中網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營(yíng)網(wǎng)站建設(shè)方案,重慶APP開(kāi)發(fā),晉中h5成都微信小程序搭建,晉中網(wǎng)站營(yíng)銷推廣歡迎晉中等地區(qū)企業(yè)咨詢

int PyWeakref_Check(ob)

如果 ob 是一個(gè)引用或代理對(duì)象則返回真值。 此函數(shù)總是會(huì)成功執(zhí)行。

int PyWeakref_CheckRef(ob)

如果 ob 是一個(gè)引用對(duì)象則返回真值。 此函數(shù)總是會(huì)成功執(zhí)行。

int PyWeakref_CheckProxy(ob)

如果 ob 是一個(gè)代理對(duì)象則返回真值。 此函數(shù)總是會(huì)成功執(zhí)行。

PyObject *PyWeakref_NewRef(PyObject *ob, PyObject *callback)

Return value: New reference. Part of the Stable ABI.

Return a weak reference object for the object ob. This will always return a new reference, but is not guaranteed to create a new object; an existing reference object may be returned. The second parameter, callback, can be a callable object that receives notification when ob is garbage collected; it should accept a single parameter, which will be the weak reference object itself. callback may also be None or NULL. If ob is not a weakly referencable object, or if callback is not callable, None, or NULL, this will return NULL and raise TypeError.

PyObject *PyWeakref_NewProxy(PyObject *ob, PyObject *callback)

Return value: New reference. Part of the Stable ABI.

Return a weak reference proxy object for the object ob. This will always return a new reference, but is not guaranteed to create a new object; an existing proxy object may be returned. The second parameter, callback, can be a callable object that receives notification when ob is garbage collected; it should accept a single parameter, which will be the weak reference object itself. callback may also be None or NULL. If ob is not a weakly referencable object, or if callback is not callable, None, or NULL, this will return NULL and raise TypeError.

PyObject *PyWeakref_GetObject(PyObject *ref)

Return value: Borrowed reference. Part of the Stable ABI.

返回弱引用對(duì)象 ref 的被引用對(duì)象。如果被引用對(duì)象不再存在,則返回 Py_None

備注

該函數(shù)返回被引用對(duì)象的一個(gè) borrowed reference。 這意味著應(yīng)該總是在該對(duì)象上調(diào)用 Py_INCREF(),除非是當(dāng)它在借入引用的最后一次被使用之前無(wú)法被銷毀的時(shí)候。

PyObject *PyWeakref_GET_OBJECT(PyObject *ref)

Return value: Borrowed reference.

Similar to PyWeakref_GetObject(), but does no error checking.


當(dāng)前題目:創(chuàng)新互聯(lián)Python教程:弱引用對(duì)象
瀏覽地址:http://www.5511xx.com/article/cohcgjh.html