(arg) - Python
argument and parameter positions
clojure
(arg pos? val?)Where:
Examples
Find handlers whose first parameter is request.
clojure
(fun _ (arg 1 (id request)))Selects in lines { 1 } but not in { 3 }:
python
def handle(request, response):
pass
def handle_no_request(response):
passLocate open calls that write to disk.
clojure
(call (id "open") (arg 2 (str "w")))Selects in lines { 1 } but not in { 2, 3 }:
python
open(path, "w")
open(path, "r")
open(path, "wb")Find calls that have at least two arguments.
clojure
(call _ (arg 2))Selects in lines { 2, 3 } but not in { 1 }:
python
foo(1)
foo(1, 2)
bar(1, 2, 3)Arguments
pos
- Number
- Numeric Range
Does NOT support: Composition — Free-form Selection — Refinement — Replacement
val
- Identifier: shorthand for (id)
- String: shorthand for (str)
- (:into)
- (:nearest)
- (:and)
- (:or)
- (:not)
- (:text)
- (:kind)
- (:replace)
- (:replace-in)
- (:capture)
- (:ref)
- (call)
- (fun)
- (gen)
- (id)
- (num)
- (str)