Debian Codegraph @

docs/src/tutorial/query/code02.py

raw symbols SCIP
1 weapons = ["Ninjato", "Shuriken", "Katana", "Kama", "Kunai", "Naginata", "Yari"]
2
3
4 @api.get("/weapons/search")
5 def search_weapons(request, q: str, offset: int = 0):
6 results = [w for w in weapons if q in w.lower()]
7 return results[offset : offset + 10]