Python types.GetSetDescriptorType() Examples

The following are code examples for showing how to use types.GetSetDescriptorType(). They are from open source Python projects. You can vote up the examples you like or vote down the ones you don't like.

Example 1
Project: pyblish-win   Author: pyblish   File: inspect.py    GNU Lesser General Public License v3.0 5 votes vote down vote up
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
Project: jawfish   Author: war-and-code   File: inspect.py    MIT License 5 votes vote down vote up
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
Project: jawfish   Author: war-and-code   File: inspect.py    MIT License 5 votes vote down vote up
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
Project: NiujiaoDebugger   Author: MrSrc   File: inspect.py    GNU General Public License v3.0 5 votes vote down vote up
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
Project: NiujiaoDebugger   Author: MrSrc   File: inspect.py    GNU General Public License v3.0 5 votes vote down vote up
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 6
Project: ironpython2   Author: IronLanguages   File: inspect.py    Apache License 2.0 5 votes vote down vote up
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 7
Project: Blockly-rduino-communication   Author: technologiescollege   File: getattr_static.py    GNU General Public License v3.0 5 votes vote down vote up
def _shadowed_dict_newstyle(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 8
Project: Blockly-rduino-communication   Author: technologiescollege   File: inspect.py    GNU General Public License v3.0 5 votes vote down vote up
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
Project: Blockly-rduino-communication   Author: technologiescollege   File: inspect.py    GNU General Public License v3.0 5 votes vote down vote up
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 10
Project: IronHydra   Author: microdee   File: inspect.py    MIT License 5 votes vote down vote up
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
Project: 2015cdb_g4   Author: 40223208   File: inspect.py    GNU General Public License v3.0 5 votes vote down vote up
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
Project: 2015cdb_g4   Author: 40223208   File: inspect.py    GNU General Public License v3.0 5 votes vote down vote up
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 13
Project: cqp-sdk-for-py37-native   Author: crud-boy   File: inspect.py    GNU General Public License v2.0 5 votes vote down vote up
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 14
Project: cqp-sdk-for-py37-native   Author: crud-boy   File: inspect.py    GNU General Public License v2.0 5 votes vote down vote up
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 15
Project: aws-lambda-runtime-pypy   Author: uscheller   File: inspect.py    Apache License 2.0 5 votes vote down vote up
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
Project: aws-lambda-runtime-pypy   Author: uscheller   File: inspect.py    Apache License 2.0 5 votes vote down vote up
def _shadowed_dict(klass):
    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
                    _objclass_check(class_dict, entry)):
                return class_dict
    return _sentinel 
Example 17
Project: Computable   Author: ktraunmueller   File: inspect.py    MIT License 5 votes vote down vote up
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 18
Project: oss-ftp   Author: aliyun   File: inspect.py    MIT License 5 votes vote down vote up
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
Project: setup   Author: mindbender-studio   File: inspect.py    MIT License 5 votes vote down vote up
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 20
Project: setup   Author: mindbender-studio   File: inspect.py    MIT License 5 votes vote down vote up
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 21
Project: conf   Author: XonqNopp   File: inspect_example.py    GNU General Public License v3.0 5 votes vote down vote up
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
Project: conf   Author: XonqNopp   File: inspect_example.py    GNU General Public License v3.0 5 votes vote down vote up
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 23
Project: 2015wcm   Author: coursemdetw   File: inspect.py    GNU Affero General Public License v3.0 5 votes vote down vote up
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
Project: 2015wcm   Author: coursemdetw   File: inspect.py    GNU Affero General Public License v3.0 5 votes vote down vote up
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 25
Project: pmatic   Author: LarsMichelsen   File: inspect.py    GNU General Public License v2.0 5 votes vote down vote up
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
Project: godot-zeronet-plugin   Author: zam-org   File: inspect.py    GNU General Public License v2.0 5 votes vote down vote up
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
Project: godot-zeronet-plugin   Author: zam-org   File: inspect.py    GNU General Public License v2.0 5 votes vote down vote up
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 28
Project: godot-zeronet-plugin   Author: zam-org   File: inspect.py    GNU General Public License v2.0 5 votes vote down vote up
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
Project: godot-zeronet-plugin   Author: zam-org   File: inspect.py    GNU General Public License v2.0 5 votes vote down vote up
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 30
Project: godot-zeronet-plugin   Author: zam-org   File: inspect.py    GNU General Public License v2.0 5 votes vote down vote up
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 31
Project: geofire-python   Author: ininex   File: dill.py    MIT License 5 votes vote down vote up
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)
            log.info("# Dp")
            return
        # all bad below... so throw ReferenceError or TypeError
        raise ReferenceError("%s does not reference a class __dict__" % obj) 
Example 32
Project: KalutClient   Author: TwoUnderscorez   File: inspect.py    Apache License 2.0 5 votes vote down vote up
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 33
Project: kinect-2-libras   Author: inessadl   File: inspect.py    Apache License 2.0 5 votes vote down vote up
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 34
Project: Savethemblobs_app   Author: iApeiron   File: inspect.py    MIT License 5 votes vote down vote up
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 35
Project: Wallet   Author: superbitcoin   File: inspect.py    MIT License 5 votes vote down vote up
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 36
Project: python-hunter   Author: ionelmc   File: inspect.py    BSD 2-Clause "Simplified" License 5 votes vote down vote up
def _shadowed_dict_newstyle(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  # noqa
                    class_dict.__name__ == "__dict__" and
                    class_dict.__objclass__ is entry):
                return class_dict
    return _sentinel 
Example 37
Project: AsemanOs   Author: AsemanOS   File: getattr_static.py    GNU General Public License v3.0 5 votes vote down vote up
def _shadowed_dict_newstyle(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 38
Project: Hot   Author: dsolimando   File: inspect.py    GNU General Public License v3.0 5 votes vote down vote up
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 39
Project: linux-cross-gcc   Author: nmercier   File: inspect.py    BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
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 40
Project: linux-cross-gcc   Author: nmercier   File: inspect.py    BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
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 41
Project: dotfiles   Author: xbaysal11   File: getattr_static.py    GNU General Public License v3.0 5 votes vote down vote up
def _shadowed_dict_newstyle(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 42
Project: kkFileView   Author: kekingcn   File: inspect.py    Apache License 2.0 5 votes vote down vote up
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 43
Project: docker   Author: getavalon   File: inspect.py    MIT License 5 votes vote down vote up
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 44
Project: docker   Author: getavalon   File: inspect.py    MIT License 5 votes vote down vote up
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 45
Project: Splunking-Crime   Author: nccgroup   File: inspect.py    GNU Affero General Public License v3.0 5 votes vote down vote up
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 46
Project: cryptobot   Author: nbiederbeck   File: getattr_static.py    MIT License 5 votes vote down vote up
def _shadowed_dict_newstyle(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 47
Project: cryptobot   Author: nbiederbeck   File: getattr_static.py    MIT License 5 votes vote down vote up
def _shadowed_dict_newstyle(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 48
Project: senior-design   Author: james-tate   File: inspect.py    GNU General Public License v2.0 5 votes vote down vote up
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 49
Project: Project-New-Reign---Nemesis-Main   Author: ShikyoKira   File: inspect.py    GNU General Public License v3.0 5 votes vote down vote up
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 50
Project: Project-New-Reign---Nemesis-Main   Author: ShikyoKira   File: inspect.py    GNU General Public License v3.0 5 votes vote down vote up
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