@@ -277,63 +277,63 @@ attributes:
277
277
278
278
.. function :: ismodule(object)
279
279
280
- Return true if the object is a module.
280
+ Return `` True `` if the object is a module.
281
281
282
282
283
283
.. function :: isclass(object)
284
284
285
- Return true if the object is a class, whether built-in or created in Python
285
+ Return `` True `` if the object is a class, whether built-in or created in Python
286
286
code.
287
287
288
288
289
289
.. function :: ismethod(object)
290
290
291
- Return true if the object is a bound method written in Python.
291
+ Return `` True `` if the object is a bound method written in Python.
292
292
293
293
294
294
.. function :: isfunction(object)
295
295
296
- Return true if the object is a Python function, which includes functions
296
+ Return `` True `` if the object is a Python function, which includes functions
297
297
created by a :term: `lambda ` expression.
298
298
299
299
300
300
.. function :: isgeneratorfunction(object)
301
301
302
- Return true if the object is a Python generator function.
302
+ Return `` True `` if the object is a Python generator function.
303
303
304
304
.. versionchanged :: 3.8
305
- Functions wrapped in :func: `functools.partial ` now return true if the
305
+ Functions wrapped in :func: `functools.partial ` now return `` True `` if the
306
306
wrapped function is a Python generator function.
307
307
308
308
309
309
.. function :: isgenerator(object)
310
310
311
- Return true if the object is a generator.
311
+ Return `` True `` if the object is a generator.
312
312
313
313
314
314
.. function :: iscoroutinefunction(object)
315
315
316
- Return true if the object is a :term: `coroutine function `
316
+ Return `` True `` if the object is a :term: `coroutine function `
317
317
(a function defined with an :keyword: `async def ` syntax).
318
318
319
319
.. versionadded :: 3.5
320
320
321
321
.. versionchanged :: 3.8
322
- Functions wrapped in :func: `functools.partial ` now return true if the
322
+ Functions wrapped in :func: `functools.partial ` now return `` True `` if the
323
323
wrapped function is a :term: `coroutine function `.
324
324
325
325
326
326
.. function :: iscoroutine(object)
327
327
328
- Return true if the object is a :term: `coroutine ` created by an
328
+ Return `` True `` if the object is a :term: `coroutine ` created by an
329
329
:keyword: `async def ` function.
330
330
331
331
.. versionadded :: 3.5
332
332
333
333
334
334
.. function :: isawaitable(object)
335
335
336
- Return true if the object can be used in :keyword: `await ` expression.
336
+ Return `` True `` if the object can be used in :keyword: `await ` expression.
337
337
338
338
Can also be used to distinguish generator-based coroutines from regular
339
339
generators::
@@ -352,7 +352,7 @@ attributes:
352
352
353
353
.. function :: isasyncgenfunction(object)
354
354
355
- Return true if the object is an :term: `asynchronous generator ` function,
355
+ Return `` True `` if the object is an :term: `asynchronous generator ` function,
356
356
for example::
357
357
358
358
>>> async def agen():
@@ -364,50 +364,50 @@ attributes:
364
364
.. versionadded :: 3.6
365
365
366
366
.. versionchanged :: 3.8
367
- Functions wrapped in :func: `functools.partial ` now return true if the
367
+ Functions wrapped in :func: `functools.partial ` now return `` True `` if the
368
368
wrapped function is a :term: `asynchronous generator ` function.
369
369
370
370
371
371
.. function :: isasyncgen(object)
372
372
373
- Return true if the object is an :term: `asynchronous generator iterator `
373
+ Return `` True `` if the object is an :term: `asynchronous generator iterator `
374
374
created by an :term: `asynchronous generator ` function.
375
375
376
376
.. versionadded :: 3.6
377
377
378
378
.. function :: istraceback(object)
379
379
380
- Return true if the object is a traceback.
380
+ Return `` True `` if the object is a traceback.
381
381
382
382
383
383
.. function :: isframe(object)
384
384
385
- Return true if the object is a frame.
385
+ Return `` True `` if the object is a frame.
386
386
387
387
388
388
.. function :: iscode(object)
389
389
390
- Return true if the object is a code.
390
+ Return `` True `` if the object is a code.
391
391
392
392
393
393
.. function :: isbuiltin(object)
394
394
395
- Return true if the object is a built-in function or a bound built-in method.
395
+ Return `` True `` if the object is a built-in function or a bound built-in method.
396
396
397
397
398
398
.. function :: isroutine(object)
399
399
400
- Return true if the object is a user-defined or built-in function or method.
400
+ Return `` True `` if the object is a user-defined or built-in function or method.
401
401
402
402
403
403
.. function :: isabstract(object)
404
404
405
- Return true if the object is an abstract base class.
405
+ Return `` True `` if the object is an abstract base class.
406
406
407
407
408
408
.. function :: ismethoddescriptor(object)
409
409
410
- Return true if the object is a method descriptor, but not if
410
+ Return `` True `` if the object is a method descriptor, but not if
411
411
:func: `ismethod `, :func: `isclass `, :func: `isfunction ` or :func: `isbuiltin `
412
412
are true.
413
413
@@ -418,14 +418,14 @@ attributes:
418
418
sensible, and :attr: `__doc__ ` often is.
419
419
420
420
Methods implemented via descriptors that also pass one of the other tests
421
- return false from the :func: `ismethoddescriptor ` test, simply because the
421
+ return `` False `` from the :func: `ismethoddescriptor ` test, simply because the
422
422
other tests promise more -- you can, e.g., count on having the
423
423
:attr: `__func__ ` attribute (etc) when an object passes :func: `ismethod `.
424
424
425
425
426
426
.. function :: isdatadescriptor(object)
427
427
428
- Return true if the object is a data descriptor.
428
+ Return `` True `` if the object is a data descriptor.
429
429
430
430
Data descriptors have both a :attr: `~object.__get__ ` and a :attr: `~object.__set__ ` method.
431
431
Examples are properties (defined in Python), getsets, and members. The
@@ -438,7 +438,7 @@ attributes:
438
438
439
439
.. function :: isgetsetdescriptor(object)
440
440
441
- Return true if the object is a getset descriptor.
441
+ Return `` True `` if the object is a getset descriptor.
442
442
443
443
.. impl-detail ::
444
444
@@ -449,7 +449,7 @@ attributes:
449
449
450
450
.. function :: ismemberdescriptor(object)
451
451
452
- Return true if the object is a member descriptor.
452
+ Return `` True `` if the object is a member descriptor.
453
453
454
454
.. impl-detail ::
455
455
0 commit comments