Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/fluentpython/example-code-2e
/ match_asian_cities
Function
match_asian_cities
05-data-classes/match_cities.py:24–30 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
22
23
# tag::ASIA[]
24
def
match_asian_cities():
25
results = []
26
for
city in cities:
27
match city:
28
case City(continent=
'Asia'
):
29
results.append(city)
30
return
results
31
# end::ASIA[]
32
33
# tag::ASIA_POSITIONAL[]
Callers
nothing calls this directly
Calls
1
append
Method · 0.45
Tested by
no test coverage detected