Python types.GetSetDescriptorType() Examples
The following are 30
code examples of types.GetSetDescriptorType().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
types
, or try the search function
.
Example #1
Source File: inspect.py From PokemonGo-DesktopMap with MIT License | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #2
Source File: inspect.py From Project-New-Reign---Nemesis-Main with GNU General Public License v3.0 | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #3
Source File: inspect.py From Project-New-Reign---Nemesis-Main with GNU General Public License v3.0 | 5 votes |
def _shadowed_dict(klass): dict_attr = type.__dict__["__dict__"] for entry in _static_getmro(klass): try: class_dict = dict_attr.__get__(entry)["__dict__"] except KeyError: pass else: if not (type(class_dict) is types.GetSetDescriptorType and class_dict.__name__ == "__dict__" and class_dict.__objclass__ is entry): return class_dict return _sentinel
Example #4
Source File: inspect.py From medicare-demo with Apache License 2.0 | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #5
Source File: dill.py From dagbldr with BSD 3-Clause "New" or "Revised" License | 5 votes |
def save_dictproxy(pickler, obj): log.info("Dp: %s" % obj) attr = obj.get('__dict__') #pickler.save_reduce(_create_dictproxy, (attr,'nested'), obj=obj) if type(attr) == GetSetDescriptorType and attr.__name__ == "__dict__" \ and getattr(attr.__objclass__, "__dict__", None) == obj: pickler.save_reduce(getattr, (attr.__objclass__,"__dict__"),obj=obj) return # all bad below... so throw ReferenceError or TypeError from weakref import ReferenceError raise ReferenceError("%s does not reference a class __dict__" % obj)
Example #6
Source File: dill.py From dagbldr with BSD 3-Clause "New" or "Revised" License | 5 votes |
def save_dictproxy(pickler, obj): log.info("Dp: %s" % obj) attr = obj.get('__dict__') #pickler.save_reduce(_create_dictproxy, (attr,'nested'), obj=obj) if type(attr) == GetSetDescriptorType and attr.__name__ == "__dict__" \ and getattr(attr.__objclass__, "__dict__", None) == obj: pickler.save_reduce(getattr, (attr.__objclass__,"__dict__"),obj=obj) return # all bad below... so throw ReferenceError or TypeError from weakref import ReferenceError raise ReferenceError("%s does not reference a class __dict__" % obj)
Example #7
Source File: inspect.py From CTFCrackTools-V2 with GNU General Public License v3.0 | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #8
Source File: inspect.py From CTFCrackTools-V2 with GNU General Public License v3.0 | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #9
Source File: inspect.py From RevitBatchProcessor with GNU General Public License v3.0 | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #10
Source File: inspect.py From Splunking-Crime with GNU Affero General Public License v3.0 | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #11
Source File: inspect.py From unity-python with MIT License | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #12
Source File: inspect.py From android_universal with MIT License | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #13
Source File: inspect.py From android_universal with MIT License | 5 votes |
def _shadowed_dict(klass): dict_attr = type.__dict__["__dict__"] for entry in _static_getmro(klass): try: class_dict = dict_attr.__get__(entry)["__dict__"] except KeyError: pass else: if not (type(class_dict) is types.GetSetDescriptorType and class_dict.__name__ == "__dict__" and class_dict.__objclass__ is entry): return class_dict return _sentinel
Example #14
Source File: inspect.py From canape with GNU General Public License v3.0 | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #15
Source File: inspect.py From CTFCrackTools with GNU General Public License v3.0 | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #16
Source File: inspect.py From CTFCrackTools with GNU General Public License v3.0 | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #17
Source File: jsonobject.py From zstack-utility with Apache License 2.0 | 5 votes |
def _is_unsupported_type(obj): return isinstance(obj, (types.ComplexType, types.TupleType, types.FunctionType, types.LambdaType, types.GeneratorType, types.MethodType, types.UnboundMethodType, types.BuiltinFunctionType, types.BuiltinMethodType, types.FileType, types.XRangeType, types.TracebackType, types.FrameType, types.DictProxyType, types.NotImplementedType, types.GetSetDescriptorType, types.MemberDescriptorType))
Example #18
Source File: inspect.py From pmatic with GNU General Public License v2.0 | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #19
Source File: inspect.py From jawfish with MIT License | 5 votes |
def _shadowed_dict(klass): dict_attr = type.__dict__["__dict__"] for entry in _static_getmro(klass): try: class_dict = dict_attr.__get__(entry)["__dict__"] except KeyError: pass else: if not (type(class_dict) is types.GetSetDescriptorType and class_dict.__name__ == "__dict__" and class_dict.__objclass__ is entry): return class_dict return _sentinel
Example #20
Source File: inspect.py From meddle with MIT License | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #21
Source File: inspect.py From ironpython2 with Apache License 2.0 | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #22
Source File: inspect.py From BinderFilter with MIT License | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #23
Source File: inspect.py From Computable with MIT License | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #24
Source File: inspect.py From oss-ftp with MIT License | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #25
Source File: inspect.py From jawfish with MIT License | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #26
Source File: inspect.py From Fluid-Designer with GNU General Public License v3.0 | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #27
Source File: inspect.py From Fluid-Designer with GNU General Public License v3.0 | 5 votes |
def _shadowed_dict(klass): dict_attr = type.__dict__["__dict__"] for entry in _static_getmro(klass): try: class_dict = dict_attr.__get__(entry)["__dict__"] except KeyError: pass else: if not (type(class_dict) is types.GetSetDescriptorType and class_dict.__name__ == "__dict__" and class_dict.__objclass__ is entry): return class_dict return _sentinel
Example #28
Source File: inspect.py From Imogen with MIT License | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)
Example #29
Source File: inspect.py From Imogen with MIT License | 5 votes |
def _shadowed_dict(klass): dict_attr = type.__dict__["__dict__"] for entry in _static_getmro(klass): try: class_dict = dict_attr.__get__(entry)["__dict__"] except KeyError: pass else: if not (type(class_dict) is types.GetSetDescriptorType and class_dict.__name__ == "__dict__" and class_dict.__objclass__ is entry): return class_dict return _sentinel
Example #30
Source File: inspect.py From ironpython3 with Apache License 2.0 | 5 votes |
def isgetsetdescriptor(object): """Return true if the object is a getset descriptor. getset descriptors are specialized descriptors defined in extension modules.""" return isinstance(object, types.GetSetDescriptorType)