| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -115,7 +115,7 @@ The terms "coroutine function" and "coroutine object" are often conflated | |||
| 115 | 115 | as coroutine. | |
| 116 | 116 | That can be confusing! | |
| 117 | 117 | In this article, coroutine specifically refers to a coroutine object, or more | |
| 118 | - precisely, an instance of :data:`types.CoroutineType` (native coroutine). | ||
| 118 | + precisely, an instance of :class:`types.CoroutineType` (native coroutine). | ||
| 119 | 119 | Note that coroutines can also exist as instances of | |
| 120 | 120 | :class:`collections.abc.Coroutine` -- a distinction that matters for type | |
| 121 | 121 | checking. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -150,8 +150,8 @@ Standard names are defined for the following types: | |||
| 150 | 150 | .. versionadded:: 3.10 | |
| 151 | 151 | ||
| 152 | 152 | ||
| 153 | - .. data:: FunctionType | ||
| 154 | - LambdaType | ||
| 153 | + .. class:: FunctionType | ||
| 154 | + LambdaType | ||
| 155 | 155 | ||
| 156 | 156 | The type of user-defined functions and functions created by | |
| 157 | 157 | :keyword:`lambda` expressions. | |
@@ -162,21 +162,21 @@ Standard names are defined for the following types: | |||
| 162 | 162 | and is not raised for normal compilation. | |
| 163 | 163 | ||
| 164 | 164 | ||
| 165 | - .. data:: GeneratorType | ||
| 165 | + .. class:: GeneratorType | ||
| 166 | 166 | ||
| 167 | 167 | The type of :term:`generator`-iterator objects, created by | |
| 168 | 168 | generator functions. | |
| 169 | 169 | ||
| 170 | 170 | ||
| 171 | - .. data:: CoroutineType | ||
| 171 | + .. class:: CoroutineType | ||
| 172 | 172 | ||
| 173 | 173 | The type of :term:`coroutine` objects, created by | |
| 174 | 174 | :keyword:`async def` functions. | |
| 175 | 175 | ||
| 176 | 176 | .. versionadded:: 3.5 | |
| 177 | 177 | ||
| 178 | 178 | ||
| 179 | - .. data:: AsyncGeneratorType | ||
| 179 | + .. class:: AsyncGeneratorType | ||
| 180 | 180 | ||
| 181 | 181 | The type of :term:`asynchronous generator`-iterator objects, created by | |
| 182 | 182 | asynchronous generator functions. | |
@@ -196,36 +196,36 @@ Standard names are defined for the following types: | |||
| 196 | 196 | required by the initializer. The audit event only occurs for direct | |
| 197 | 197 | instantiation of code objects, and is not raised for normal compilation. | |
| 198 | 198 | ||
| 199 | - .. data:: CellType | ||
| 199 | + .. class:: CellType | ||
| 200 | 200 | ||
| 201 | 201 | The type for cell objects: such objects are used as containers for | |
| 202 | 202 | a function's :term:`closure variables <closure variable>`. | |
| 203 | 203 | ||
| 204 | 204 | .. versionadded:: 3.8 | |
| 205 | 205 | ||
| 206 | 206 | ||
| 207 | - .. data:: MethodType | ||
| 207 | + .. class:: MethodType | ||
| 208 | 208 | ||
| 209 | 209 | The type of methods of user-defined class instances. | |
| 210 | 210 | ||
| 211 | 211 | ||
| 212 | - .. data:: BuiltinFunctionType | ||
| 213 | - BuiltinMethodType | ||
| 212 | + .. class:: BuiltinFunctionType | ||
| 213 | + BuiltinMethodType | ||
| 214 | 214 | ||
| 215 | 215 | The type of built-in functions like :func:`len` or :func:`sys.exit`, and | |
| 216 | 216 | methods of built-in classes. (Here, the term "built-in" means "written in | |
| 217 | 217 | C".) | |
| 218 | 218 | ||
| 219 | 219 | ||
| 220 | - .. data:: WrapperDescriptorType | ||
| 220 | + .. class:: WrapperDescriptorType | ||
| 221 | 221 | ||
| 222 | 222 | The type of methods of some built-in data types and base classes such as | |
| 223 | 223 | :meth:`object.__init__` or :meth:`object.__lt__`. | |
| 224 | 224 | ||
| 225 | 225 | .. versionadded:: 3.7 | |
| 226 | 226 | ||
| 227 | 227 | ||
| 228 | - .. data:: MethodWrapperType | ||
| 228 | + .. class:: MethodWrapperType | ||
| 229 | 229 | ||
| 230 | 230 | The type of *bound* methods of some built-in data types and base classes. | |
| 231 | 231 | For example it is the type of :code:`object().__str__`. | |
@@ -240,14 +240,14 @@ Standard names are defined for the following types: | |||
| 240 | 240 | .. versionadded:: 3.10 | |
| 241 | 241 | ||
| 242 | 242 | ||
| 243 | - .. data:: MethodDescriptorType | ||
| 243 | + .. class:: MethodDescriptorType | ||
| 244 | 244 | ||
| 245 | 245 | The type of methods of some built-in data types such as :meth:`str.join`. | |
| 246 | 246 | ||
| 247 | 247 | .. versionadded:: 3.7 | |
| 248 | 248 | ||
| 249 | 249 | ||
| 250 | - .. data:: ClassMethodDescriptorType | ||
| 250 | + .. class:: ClassMethodDescriptorType | ||
| 251 | 251 | ||
| 252 | 252 | The type of *unbound* class methods of some built-in data types such as | |
| 253 | 253 | ``dict.__dict__['fromkeys']``. | |
@@ -327,13 +327,13 @@ Standard names are defined for the following types: | |||
| 327 | 327 | dynamically. | |
| 328 | 328 | ||
| 329 | 329 | ||
| 330 | - .. data:: FrameType | ||
| 330 | + .. class:: FrameType | ||
| 331 | 331 | ||
| 332 | 332 | The type of :ref:`frame objects <frame-objects>` such as found in | |
| 333 | 333 | :attr:`tb.tb_frame <traceback.tb_frame>` if ``tb`` is a traceback object. | |
| 334 | 334 | ||
| 335 | 335 | ||
| 336 | - .. data:: GetSetDescriptorType | ||
| 336 | + .. class:: GetSetDescriptorType | ||
| 337 | 337 | ||
| 338 | 338 | The type of objects defined in extension modules with ``PyGetSetDef``, such | |
| 339 | 339 | as :attr:`FrameType.f_locals <frame.f_locals>` or ``array.array.typecode``. | |
@@ -342,7 +342,7 @@ Standard names are defined for the following types: | |||
| 342 | 342 | :class:`property` type, but for classes defined in extension modules. | |
| 343 | 343 | ||
| 344 | 344 | ||
| 345 | - .. data:: MemberDescriptorType | ||
| 345 | + .. class:: MemberDescriptorType | ||
| 346 | 346 | ||
| 347 | 347 | The type of objects defined in extension modules with ``PyMemberDef``, such | |
| 348 | 348 | as ``datetime.timedelta.days``. This type is used as descriptor for simple C | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1928,7 +1928,7 @@ Changes in the Python API | |||
| 1928 | 1928 | (Contributed by Yurii Karabas, Andrew Svetlov, Yury Selivanov and Kyle Stanley | |
| 1929 | 1929 | in :issue:`42392`.) | |
| 1930 | 1930 | ||
| 1931 | - * The :data:`types.FunctionType` constructor now inherits the current builtins | ||
| 1931 | + * The :class:`types.FunctionType` constructor now inherits the current builtins | ||
| 1932 | 1932 | if the *globals* dictionary has no ``"__builtins__"`` key, rather than using | |
| 1933 | 1933 | ``{"None": None}`` as builtins: same behavior as :func:`eval` and | |
| 1934 | 1934 | :func:`exec` functions. Defining a function with ``def function(...): ...`` | |
| Back | FazBrowse Home | New Git URL |
0 commit comments