Home
last modified time | relevance | path

Searched refs:mydict (Results 1 – 25 of 30) sorted by relevance

12

/external/python/cpython3/Lib/test/
Dtest_dict_version.py19 def check_version_unique(self, mydict): argument
20 version = _testcapi.dict_get_version(mydict)
24 def check_version_changed(self, mydict, method, *args, **kw): argument
26 self.check_version_unique(mydict)
29 def check_version_dont_change(self, mydict, method, *args, **kw): argument
30 version1 = _testcapi.dict_get_version(mydict)
35 version2 = _testcapi.dict_get_version(mydict)
Dmapping_tests.py440 class mydict(self.type2test): class
443 ud = mydict.fromkeys('ab')
568 class mydict(self.type2test): class
571 ud = mydict.fromkeys('ab')
Dtest_dict.py231 class mydict(dict): class
234 ud = mydict.fromkeys('ab')
487 mydict, key = NastyKey.mutate_dict
489 del mydict[key]
/external/scapy/scapy/
Dmain.py290 def init_session(session_name, mydict=None): argument
329 if mydict is not None:
330 six.moves.builtins.__dict__["scapy_session"].update(mydict)
331 update_ipython_session(mydict)
332 GLOBKEYS.extend(mydict)
369 def interact(mydict=None,argv=None,mybanner=None,loglevel=20): argument
417 init_session(session_name, mydict)
494 init_session(session_name, mydict)
/external/python/cpython2/Python/
Derrors.c582 PyObject *mydict = NULL; in PyErr_NewException() local
594 dict = mydict = PyDict_New(); in PyErr_NewException()
620 Py_XDECREF(mydict); in PyErr_NewException()
633 PyObject *mydict = NULL; /* points to the dict only if we create it */ in PyErr_NewExceptionWithDoc() local
637 dict = mydict = PyDict_New(); in PyErr_NewExceptionWithDoc()
655 Py_XDECREF(mydict); in PyErr_NewExceptionWithDoc()
/external/python/cpython3/Python/
Derrors.c864 PyObject *mydict = NULL; in PyErr_NewException() local
876 dict = mydict = PyDict_New(); in PyErr_NewException()
902 Py_XDECREF(mydict); in PyErr_NewException()
916 PyObject *mydict = NULL; /* points to the dict only if we create it */ in PyErr_NewExceptionWithDoc() local
920 dict = mydict = PyDict_New(); in PyErr_NewExceptionWithDoc()
938 Py_XDECREF(mydict); in PyErr_NewExceptionWithDoc()
/external/scapy/scapy/contrib/
Dripng.py52 interact(mydict=globals(), mybanner="RIPng")
Dsend.py91 interact(mydict=globals(), mybanner="SEND add-on")
Dvtp.py186 interact(mydict=globals(), mybanner="VTP")
Ddtp.py131 interact(mydict=globals(), mybanner="DTP")
Dskinny.py503 interact(mydict=globals(),mybanner="Welcome to Skinny add-on")
Dtacacs.py444 interact(mydict=globals(), mybanner='tacacs+')
Deigrp.py497 interact(mydict=globals(), mybanner="EIGRP")
Dospf.py758 interact(mydict=globals(), mybanner="OSPF extension %s" % EXT_VERSION)
Dgtp.py889 interact(mydict=globals(), mybanner="GTPv1 add-on")
/external/python/cpython2/Doc/faq/
Ddesign.rst311 value = mydict[key]
313 mydict[key] = getvalue(key)
314 value = mydict[key]
319 if key in mydict:
320 value = mydict[key]
322 value = mydict[key] = getvalue(key)
327 mydict.setdefault(key, getvalue(key))``.
563 mydict = {[1, 2]: '12'}
564 print mydict[[1, 2]]
638 for key in sorted(mydict):
[all …]
Dprogramming.rst488 def foo(mydict={}): # Danger: shared reference to one dict for all calls
490 mydict[key] = value
491 return mydict
493 The first time you call this function, ``mydict`` contains a single item. The
494 second time, ``mydict`` contains two items because when ``foo()`` begins
495 executing, ``mydict`` starts out with an item already in it.
511 def foo(mydict={}):
516 def foo(mydict=None):
517 if mydict is None:
518 mydict = {} # create a new dict for local namespace
/external/python/cpython3/Doc/faq/
Ddesign.rst287 value = mydict[key]
289 mydict[key] = getvalue(key)
290 value = mydict[key]
295 if key in mydict:
296 value = mydict[key]
298 value = mydict[key] = getvalue(key)
528 mydict = {[1, 2]: '12'}
529 print(mydict[[1, 2]])
603 for key in sorted(mydict):
604 ... # do whatever with mydict[key]...
[all …]
Dprogramming.rst342 def foo(mydict={}): # Danger: shared reference to one dict for all calls
344 mydict[key] = value
345 return mydict
347 The first time you call this function, ``mydict`` contains a single item. The
348 second time, ``mydict`` contains two items because when ``foo()`` begins
349 executing, ``mydict`` starts out with an item already in it.
365 def foo(mydict={}):
370 def foo(mydict=None):
371 if mydict is None:
372 mydict = {} # create a new dict for local namespace
/external/python/cpython2/Lib/test/
Dmapping_tests.py458 class mydict(self.type2test): class
461 ud = mydict.fromkeys('ab')
594 class mydict(self.type2test): class
597 ud = mydict.fromkeys('ab')
Dtest_dict.py226 class mydict(dict): class
229 ud = mydict.fromkeys('ab')
/external/scapy/doc/scapy/
Dextending.rst87 interact(mydict=globals(), mybanner="Test add-on v3.14")
/external/python/cpython3/Modules/_ctypes/
D_ctypes.c2678 PyObject *dict, *mydict; in PyCData_setstate() local
2688 mydict = PyObject_GetAttrString(myself, "__dict__"); in PyCData_setstate()
2689 if (mydict == NULL) { in PyCData_setstate()
2692 if (!PyDict_Check(mydict)) { in PyCData_setstate()
2695 Py_TYPE(myself)->tp_name, Py_TYPE(mydict)->tp_name); in PyCData_setstate()
2696 Py_DECREF(mydict); in PyCData_setstate()
2699 res = PyDict_Update(mydict, dict); in PyCData_setstate()
2700 Py_DECREF(mydict); in PyCData_setstate()
/external/python/cpython2/Modules/_ctypes/
D_ctypes.c2794 PyObject *dict, *mydict; in PyCData_setstate() local
2801 mydict = PyObject_GetAttrString(_self, "__dict__"); in PyCData_setstate()
2802 if (mydict == NULL) { in PyCData_setstate()
2805 if (!PyDict_Check(mydict)) { in PyCData_setstate()
2808 Py_TYPE(_self)->tp_name, Py_TYPE(mydict)->tp_name); in PyCData_setstate()
2809 Py_DECREF(mydict); in PyCData_setstate()
2812 res = PyDict_Update(mydict, dict); in PyCData_setstate()
2813 Py_DECREF(mydict); in PyCData_setstate()
/external/libevent/
Devent_rpcgen.py41 def TranslateList(mylist, mydict): argument
42 return map(lambda x: x % mydict, mylist)

12