Fix an indentation error in the rST for NewType (Ryan Gonzalez).
This commit is contained in:
parent
3fc3e11bc2
commit
2ec3031a74
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue