PEP 622: Fix Django example (#1523)
Closes https://github.com/gvanrossum/patma/issues/135
This commit is contained in:
parent
d3ddd080ee
commit
bfdfd74c5c
|
@ -188,7 +188,7 @@ sequence. With the proposal in this PEP, we could rewrite that code
|
|||
into this::
|
||||
|
||||
match value:
|
||||
case [*v, label := (Promise() | str())]:
|
||||
case [*v, label := (Promise() | str())] if v:
|
||||
value = tuple(v)
|
||||
case _:
|
||||
label = key.replace('_', ' ').title()
|
||||
|
|
Loading…
Reference in New Issue