mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #23921: Standardized documentation whitespace formatting.
Original patch by James Edwards.
This commit is contained in:
commit
c499f30286
63 changed files with 445 additions and 409 deletions
|
@ -1754,11 +1754,11 @@ to remember the order that class variables are defined::
|
|||
|
||||
class OrderedClass(type):
|
||||
|
||||
@classmethod
|
||||
def __prepare__(metacls, name, bases, **kwds):
|
||||
@classmethod
|
||||
def __prepare__(metacls, name, bases, **kwds):
|
||||
return collections.OrderedDict()
|
||||
|
||||
def __new__(cls, name, bases, namespace, **kwds):
|
||||
def __new__(cls, name, bases, namespace, **kwds):
|
||||
result = type.__new__(cls, name, bases, dict(namespace))
|
||||
result.members = tuple(namespace)
|
||||
return result
|
||||
|
|
|
@ -728,7 +728,7 @@ A consequence of this is that although the ``*expression`` syntax may appear
|
|||
(and the ``**expression`` argument, if any -- see below). So::
|
||||
|
||||
>>> def f(a, b):
|
||||
... print(a, b)
|
||||
... print(a, b)
|
||||
...
|
||||
>>> f(b=1, *(2,))
|
||||
2 1
|
||||
|
|
|
@ -331,12 +331,12 @@ program:
|
|||
The simple form, ``assert expression``, is equivalent to ::
|
||||
|
||||
if __debug__:
|
||||
if not expression: raise AssertionError
|
||||
if not expression: raise AssertionError
|
||||
|
||||
The extended form, ``assert expression1, expression2``, is equivalent to ::
|
||||
|
||||
if __debug__:
|
||||
if not expression1: raise AssertionError(expression2)
|
||||
if not expression1: raise AssertionError(expression2)
|
||||
|
||||
.. index::
|
||||
single: __debug__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue