Fix an indentation error in the rST for NewType (Ryan Gonzalez).

This commit is contained in:
Guido van Rossum 2016-06-06 08:49:12 -07:00
parent 3fc3e11bc2
commit 2ec3031a74
1 changed files with 3 additions and 3 deletions

View File

@ -1191,9 +1191,9 @@ simple unique types with almost zero runtime overhead. For a static type
checker ``Derived = NewType('Derived', Base)`` is roughly equivalent checker ``Derived = NewType('Derived', Base)`` is roughly equivalent
to a definition:: to a definition::
class Derived(Base): class Derived(Base):
def __init__(self, _x: Base) -> None: def __init__(self, _x: Base) -> None:
... ...
While at runtime, ``NewType('Derived', Base)`` returns a dummy function While at runtime, ``NewType('Derived', Base)`` returns a dummy function
that simply returns its argument. Type checkers require explicit casts that simply returns its argument. Type checkers require explicit casts