Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Doc/reference/compound_stmts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1849,9 +1849,9 @@ The following example indicates the full set of allowed type parameter declarati

def overly_generic[
SimpleTypeVar,
TypeVarWithDefault = int,
TypeVarWithBound: int,
TypeVarWithConstraints: (str, bytes),
TypeVarWithDefault = int,
*SimpleTypeVarTuple = (int, float),
**SimpleParamSpec = (str, bytearray),
](
Expand Down Expand Up @@ -1952,7 +1952,7 @@ and decorators are evaluated outside that scope. This is illustrated
by this example::

@decorator
class Bag(Base[T], arg=T): ...
class Bag[T](Base[T], arg=T): ...

This is equivalent to::

Expand Down
6 changes: 3 additions & 3 deletions Doc/reference/expressions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -703,9 +703,9 @@ For example, here is a set of lowercase letters::
At run time, this corresponds roughly to calling this function::

def make_lowercase_set(iterable):
result = set(iterable)
result = set()
for x in iterable:
result.append(x.lower())
result.add(x.lower())
return result

make_lowercase_set(['a', 'A', 'b', 'C'])
Expand All @@ -726,7 +726,7 @@ At run time, this corresponds roughly to::
result[func.__name__] = func
return result

iterable([print, hex, any])
make_dict_mapping_names_to_functions([print, hex, any])

As in other kinds of dictionary displays, the same key may be specified
multiple times.
Expand Down
Loading