|
Original |
Translation |
|
75
|
A declaration inside a class that saves memory by pre-declaring space for instance attributes and eliminating instance dictionaries. Though popular, the technique is somewhat tricky to get right and is best reserved for rare cases where there are large numbers of instances in a memory-critical application.
|
|
|
76
|
An :term:`iterable` which supports efficient element access using integer indices via the :meth:`__getitem__` special method and defines a :meth:`len` method that returns the length of the sequence. Some built-in sequence types are :class:`list`, :class:`str`, :class:`tuple`, and :class:`bytes`. Note that :class:`dict` also supports :meth:`__getitem__` and :meth:`__len__`, but is considered a mapping rather than a sequence because the lookups use arbitrary :term:`immutable` keys rather than integers.
|
|
|
77
|
An object usually containing a portion of a :term:`sequence`. A slice is created using the subscript notation, ``[]`` with colons between numbers when several are given, such as in ``variable_name[1:3:5]``. The bracket (subscript) notation uses :class:`slice` objects internally.
|
|
|
78
|
A method that is called implicitly by Python to execute a certain operation on a type, such as addition. Such methods have names starting and ending with double underscores. Special methods are documented in :ref:`specialnames`.
|
|
|
79
|
A statement is part of a suite (a "block" of code). A statement is either an :term:`expression` or a one of several constructs with a keyword, such as :keyword:`if`, :keyword:`while` or :keyword:`for`.
|
|
|
80
|
|
81
|
The type of a Python object determines what kind of object it is; every object has a type. An object's type is accessible as its :attr:`__class__` attribute or can be retrieved with ``type(obj)``.
|
|
|
82
|
The objects returned from :meth:`dict.keys`, :meth:`dict.values`, and :meth:`dict.items` are called dictionary views. They are lazy sequences that will see changes in the underlying dictionary. To force the dictionary view to become a full list use ``list(dictview)``. See :ref:`dict-views`.
|
|
|
83
|
A computer defined entirely in software. Python's virtual machine executes the :term:`bytecode` emitted by the bytecode compiler.
|
|
|
84
|
Listing of Python design principles and philosophies that are helpful in understanding and using the language. The listing can be found by typing "``import this``" at the interactive prompt.
|
|