Skip to content

Commit 29f7b69

Browse files
authored
Docs: fix generic class and comprehension examples (GH-160908)
(cherry picked from commit 83fe630)
1 parent 270a30a commit 29f7b69

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎Doc/reference/compound_stmts.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,9 +1732,9 @@ The following example indicates the full set of allowed type parameter declarati
17321732

17331733
def overly_generic[
17341734
SimpleTypeVar,
1735-
TypeVarWithDefault = int,
17361735
TypeVarWithBound: int,
17371736
TypeVarWithConstraints: (str, bytes),
1737+
TypeVarWithDefault = int,
17381738
*SimpleTypeVarTuple = (int, float),
17391739
**SimpleParamSpec = (str, bytearray),
17401740
](
@@ -1835,7 +1835,7 @@ and decorators are evaluated outside that scope. This is illustrated
18351835
by this example::
18361836

18371837
@decorator
1838-
class Bag(Base[T], arg=T): ...
1838+
class Bag[T](Base[T], arg=T): ...
18391839

18401840
This is equivalent to::
18411841

0 commit comments

Comments
 (0)