HomeSort by relevance Sort by last modified time
    Searched full:descriptors (Results 1351 - 1375 of 1862) sorted by null

<<51525354555657585960>>

  /prebuilts/python/linux-x86/2.7.5/lib/python2.7/pydoc_data/
topics.py 6 'attribute-access': '\nCustomizing attribute access\n****************************\n\nThe following methods can be defined to customize the meaning of\nattribute access (use of, assignment to, or deletion of ``x.name``)\nfor class instances.\n\nobject.__getattr__(self, name)\n\n Called when an attribute lookup has not found the attribute in the\n usual places (i.e. it is not an instance attribute nor is it found\n in the class tree for ``self``). ``name`` is the attribute name.\n This method should return the (computed) attribute value or raise\n an ``AttributeError`` exception.\n\n Note that if the attribute is found through the normal mechanism,\n ``__getattr__()`` is not called. (This is an intentional asymmetry\n between ``__getattr__()`` and ``__setattr__()``.) This is done both\n for efficiency reasons and because otherwise ``__getattr__()``\n would have no way to access other attributes of the instance. Note\n that at least for instance variables, you can fake total control by\n not inserting any values in the instance attribute dictionary (but\n instead inserting them in another object). See the\n ``__getattribute__()`` method below for a way to actually get total\n control in new-style classes.\n\nobject.__setattr__(self, name, value)\n\n Called when an attribute assignment is attempted. This is called\n instead of the normal mechanism (i.e. store the value in the\n instance dictionary). *name* is the attribute name, *value* is the\n value to be assigned to it.\n\n If ``__setattr__()`` wants to assign to an instance attribute, it\n should not simply execute ``self.name = value`` --- this would\n cause a recursive call to itself. Instead, it should insert the\n value in the dictionary of instance attributes, e.g.,\n ``self.__dict__[name] = value``. For new-style classes, rather\n than accessing the instance dictionary, it should call the base\n class method with the same name, for example,\n ``object.__setattr__(self, name, value)``.\n\nobject.__delattr__(self, name)\n\n Like ``__setattr__()`` but for attribute deletion instead of\n assignment. This should only be implemented if ``del obj.name`` is\n meaningful for the object.\n\n\nMore attribute access for new-style classes\n===========================================\n\nThe following methods only apply to new-style classes.\n\nobject.__getattribute__(self, name)\n\n Called unconditionally to implement attribute accesses for\n instances of the class. If the class also defines\n ``__getattr__()``, the latter will not be called unless\n ``__getattribute__()`` either calls it explicitly or raises an\n ``AttributeError``. This method should return the (computed)\n attribute value or raise an ``AttributeError`` exception. In order\n to avoid infinite recursion in this method, its implementation\n should always call the base class method with the same name to\n access any attributes it needs, for example,\n ``object.__getattribute__(self, name)``.\n\n Note: This method may still be bypassed when looking up special methods\n as the result of implicit invocation via language syntax or\n built-in functions. See *Special method lookup for new-style\n classes*.\n\n\nImplementing Descriptors\n========================\n\nThe following methods only apply when an instance of the class\ncontaining the method (a so-called *descriptor* class) appears in an\n*owner* class (the descriptor must be in either the owner\'s class\ndictionary or in the class dictionary for one of its parents). In the\nexamples below, "the attribute" refers to the attribute whose name is\nthe key of the property in the owner class\' ``__dict__``.\n\nobject.__get__(self, instance, owner)\n\n Called to get the attribute of the owner class (class attribute\n access) or of an instance of that class (instance attribute\n access). *owner* is always the owner class, while *instance* is the\n instance that the attribute was accessed through, or ``None`` when\n the attribute is accessed through the *owner*. This method should\n return the (computed) attribute value or raise an\n ``AttributeError`` exception.\n\nobject.__set__(self, instance, value)\n\n Called to set the attribute on an instance *instance* of the owner\n class to a new value, *value*.\n\nobject.__delete__(self, instance)\n\n Called to delete the attribute on an instance *instance* of the\n owner class.\n\n\nInvoking Descriptors\n====================\n\nIn general, a descriptor is an object attribute with "binding\nbehavior", one whose attribute access has been overridden by methods\nin the descriptor protocol: ``__get__()``, ``__set__()``, and\n``__delete__()``. If any of those methods are defined for an object,\nit is said to be a descriptor.\n\nThe default behavior for attribute access is to get, set, or delete\nthe attribute from an object\'s dictionary. For instance, ``a.x`` has a\nlookup chain starting with ``a.__dict__[\'x\']``, then\n``type(a).__dict__[\'x\']``, and continuing through the base classes of\n``type(a)`` excluding metaclasses.\n\nHowever, if the looked-up value is an object defining one of the\ndescriptor methods, then Python may override the default behavior and\ninvoke the descriptor method instead. Where this occurs in the\nprecedence chain depends on which descriptor methods were defined and\nhow they were called. Note that descriptors are only invoked for new\nstyle objects or classes (ones that subclass ``object()`` or\n``type()``).\n\nThe starting point for descriptor invocation is a binding, ``a.x``.\nHow the arguments are assembled depends on ``a``:\n\nDirect Call\n The simplest and least common call is when user code directly\n invokes a descriptor method: ``x.__get__(a)``.\n\nInstance Binding\n If binding to a new-style object instance, ``a.x`` is transformed\n into the call: ``type(a).__dict__[\'x\'].__get__(a, type(a))``.\n\nClass Binding\n If binding to a new-style class, ``A.x`` is transformed into the\n call: ``A.__dict__[\'x\'].__get__(None, A)``.\n\nSuper Binding\n If ``a`` is an instance of ``super``, then the binding ``super(B,\n obj).m()`` searches ``obj.__class__.__mro__`` for the base class\n ``A`` immediately preceding ``B`` and then invokes the descriptor\n with the call: ``A.__dict__[\'m\'].__get__(obj, obj.__class__)``.\n\nFor instance bindings, the precedence of descriptor invocation depends\non the which descriptor methods are defined. A descriptor can define\nany combination of ``__get__()``, ``__set__()`` and ``__delete__()``.\nIf it does not define ``__get__()``, then accessing the attribute will\nreturn the descriptor object itself unless there is a value in the\nobject\'s instance dictionary. If the descriptor defines ``__set__()``\nand/or ``__delete__()``, it is a data descriptor; if it defines\nneither, it is a non-data descriptor. Normally, data descriptors\ndefine both ``__get__()`` and ``__set__()``, while non-data\ndescriptors have just the ``__get__()`` method. Data descriptors with\n``__set__()`` and ``__get__()`` defined always override a redefinition\nin an instance dictionary. In contrast, non-data descriptors can be\noverridden by instances.\n\nPython methods (including ``staticmethod()`` and ``classmethod()``)\nare implemented as non-data descriptors. Accordingly, instances can\nredefine and override methods. This allows individual instances to\nacquire behaviors that differ from other instances of the same class.\n\nThe ``property()`` function is implemented as a data descriptor.\nAccordingly, instances cannot override the behavior of a property.\n\n\n__slots__\n=========\n\nBy default, instances of both old and new-style classes have a\ndictionary for attribute storage. This wastes space for objects\nhaving very few instance variables. The space consumption can become\nacute when creating large numbers of instances.\n\nThe default can be overridden by defining *__slots__* in a new-style\nclass definition. The *__slots__* declaration takes a sequence of\ninstance variables and reserves just enough space in each instance to\nhold a value for each variable. Space is saved because *__dict__* is\nnot created for each instance.\n\n__slots__\n\n This class variable can be assigned a string, iterable, or sequence\n of strings with variable names used by instances. If defined in a\n new-style class, *__slots__* reserves space for the declared\n variables and prevents the automatic creation of *__dict__* and\n *__weakref__* for each instance.\n\n New in version 2.2.\n\nNotes on using *__slots__*\n\n* When inheriting from a class without *__slots__*, the *__dict__*\n attribute of that class will always be accessible, so a *__slots__*\n definition in the subclass is meaningless.\n\n* Without a *__dict__* variable, instances cannot be assigned new\n variables not listed in the *__slots__* definition. Attempts to\n assign to an unlisted variable name raises ``AttributeError``. If\n dynamic assignment of new variables is desired, then add\n ``\'__dict__\'`` to the sequence of strings in the *__slots__*\n declaration.\n\n Changed in version 2.3: Previously, adding ``\'__dict__\'`` to the\n *__slots__* declaration would not enable the assignment of new\n attributes not specifically listed in the sequence of instance\n variable names.\n\n* Without a *__weakref__* variable for each instance, classes defining\n *__slots__* do not support weak references to its instances. If weak\n reference support is needed, then add ``\'__weakref__\'`` to the\n sequence of strings in the *__slots__* declaration.\n\n Changed in version 2.3: Previously, adding ``\'__weakref__\'`` to the\n *__slots__* declaration would not enable support for weak\n references.\n\n* *__slots__* are implemented at the class level by creating\n descriptors (*Implementing Descriptors*) for each variable name. As\n a result, class attributes cannot be used to set default values for\n instance variables defined by *__slots__*; otherwise, the class\n attribute would overwrite the descriptor assignment.\n\n* The action of a *__slots__* declaration is limited to the class\n where it is defined. As a result, subclasses will have a *__dict__*\n unless they also define *__slots__* (which must only contain names\n of any *additional* slots).\n\n* If a class defines a slot also defined in a base class, the instance\n variable defined by the base class slot is inaccessible (except by\n retrieving its descriptor directly from the base class). This\n renders the meaning of the program undefined. In the future, a\n check may be added to prevent this.\n\n* Nonempty *__slots__* does not work for classes derived from\n "variable-length" built-in types such as ``long``, ``str`` and\n ``tuple``.\n\n* Any non-string iterable may be assigned to *__slots__*. Mappings may\n also be used; however, in the future, special meaning may be\n assigned to the values corresponding to each key.\n\n* *__class__* assignment works only if both classes have the same\n *__slots__*.\n\n Changed in version 2.6: Previously, *__class__* assignment raised an\n error if either new or old class had *__slots__*.\n',
    [all...]
  /external/e2fsprogs/po/
ca.po 840 "may lie only with the primary block group descriptors, and\n"
841 "the backup block group descriptors may be OK.\n"
    [all...]
e2fsprogs.pot 831 "may lie only with the primary block group descriptors, and\n"
832 "the backup block group descriptors may be OK.\n"
1274 #. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
1275 msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
1284 #. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
1285 msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
    [all...]
zh_CN.po 835 "may lie only with the primary block group descriptors, and\n"
836 "the backup block group descriptors may be OK.\n"
1281 #. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
1283 msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
1291 #. @-expanded: Warning: Group %g's copy of the group descriptors has a bad block (%b).\n
1293 msgid "Warning: Group %g's copy of the @g descriptors has a bad @b (%b).\n"
    [all...]
  /external/chromium_org/v8/src/
objects-inl.h 2356 DescriptorArray* descriptors = this->instance_descriptors(); local
4360 DescriptorArray* descriptors = instance_descriptors(); local
    [all...]
v8natives.js     [all...]
  /external/aac/libAACenc/include/
aacenc_lib.h 207 \subsection allocIOBufs Provide Buffer Descriptors
208 In the present encoder API, the input and output buffers are described with \ref AACENC_BufDesc "buffer descriptors". This mechanism allows a flexible handling
221 Allocate buffer descriptors
    [all...]
  /external/chromium_org/third_party/WebKit/Source/core/inspector/
InjectedScriptCanvasModuleSource.js     [all...]
  /external/chromium_org/third_party/protobuf/java/src/main/java/com/google/protobuf/
GeneratedMessage.java 33 import com.google.protobuf.Descriptors.Descriptor;
34 import com.google.protobuf.Descriptors.EnumValueDescriptor;
35 import com.google.protobuf.Descriptors.FieldDescriptor;
    [all...]
  /external/e2fsprogs/misc/
mke2fs.c 246 * The primary superblock and group descriptors *must* be
264 * superblocks and/or group descriptors. If so, issue a
277 _("Warning: the backup superblock/group descriptors at block %u contain\n"
    [all...]
  /external/qemu/android/
sdk-controller-socket.c 126 * When packet descriptors are allocated by this API, they are allocated large
155 * regular packet descriptors for such large transfer cannot be obtained from the
197 * When query descriptors are allocated by this API, they are allocated large
    [all...]
  /external/strace/
ChangeLog 112 Fix decoding of file descriptors
125 sys_fallocate): Use printfd() for decoding of file descriptors.
128 decoding of file descriptors.
    [all...]
  /prebuilts/python/darwin-x86/2.7.5/lib/python2.7/
subprocess.py 83 If close_fds is true, all file descriptors except 0, 1 and 2 will be
695 # On POSIX, the child objects are file descriptors. On
697 # are file descriptors on both platforms. The parent objects
    [all...]
  /prebuilts/python/linux-x86/2.7.5/lib/python2.7/
subprocess.py 83 If close_fds is true, all file descriptors except 0, 1 and 2 will be
695 # On POSIX, the child objects are file descriptors. On
697 # are file descriptors on both platforms. The parent objects
    [all...]
  /external/v8/src/x64/
macro-assembler-x64.cc     [all...]
  /art/dex2oat/
dex2oat.cc 175 // Reads the class names (java.lang.Object) and returns a set of descriptors (Ljava/lang/Object;)
202 // Reads the class names (java.lang.Object) and returns a set of descriptors (Ljava/lang/Object;)
    [all...]
  /external/chromium/net/tools/flip_server/
epoll_server.h 294 // the file-descriptors on which those events have occured.
405 // returns the number of file-descriptors registered in this EpollServer.
    [all...]
  /external/chromium_org/chrome/browser/resources/options/
language_options.js 284 * descriptors.
306 * @param {!Array} inputMethods A list of input method descriptors.
    [all...]
  /external/chromium_org/net/tools/epoll_server/
epoll_server.h 293 // the file-descriptors on which those events have occured.
404 // returns the number of file-descriptors registered in this EpollServer.
    [all...]
  /external/chromium_org/third_party/sqlite/
system-sqlite.patch 330 ** not while other file descriptors opened by the same process on
728 ** not while other file descriptors opened by the same process on
  /external/clang/lib/CodeGen/
CodeGenModule.h     [all...]
  /external/llvm/lib/Transforms/IPO/
DeadArgumentElimination.cpp 131 // finalized) we assume that subprogram descriptors won't be changed, and
    [all...]
  /external/opencv/cv/include/
cv.h     [all...]
  /external/openssh/
packet.c 105 * This variable contains the file descriptors used for
212 * Sets the descriptors used for communication. Disables encryption until
    [all...]
  /external/protobuf/src/google/protobuf/compiler/
command_line_interface.cc 908 cerr << "Cannot use --encode or --decode and generate descriptors at the "
945 << " and generate code or descriptors at the same time." << endl;
    [all...]

Completed in 2195 milliseconds

<<51525354555657585960>>