When using fn libpython-clj2.metadata/pyarglists the deafults are not shown, see below.
py-fn-argspec seems to find them, but then they get eaten up, to me on this line:
|
(map (fn [[k v]] [(symbol k) (keyword k)])) |
[(symbol k) (keyword k)] seems wrong, should be: [(symbol k) (keyword v)]
but (keyword x) returns for example "nil" on true, so defaults true are lost.
I think [(symbol k) v] should work, but not sure if for all cases.
(libpython-clj2.python/from-import os fwalk)
(->
(libpython-clj2.metadata/py-fn-argspec fwalk)
(libpython-clj2.metadata/pyarglists))
;;=> [[& [{top :top, topdown :topdown, onerror :onerror, follow_symlinks :follow_symlinks, dir_fd :dir_fd}]]
;; [& [{top :top, topdown :topdown, follow_symlinks :follow_symlinks, dir_fd :dir_fd}]]
;; [& [{top :top, follow_symlinks :follow_symlinks, dir_fd :dir_fd}]]
;; [& [{follow_symlinks :follow_symlinks, dir_fd :dir_fd}]]]
in python:
>>> import os
>>> help (os.fwalk)
fwalk (top='.', topdown=True, onerror=None, *, follow_symlinks=False, dir_fd=None)
When using fn
libpython-clj2.metadata/pyargliststhe deafults are not shown, see below.py-fn-argspecseems to find them, but then they get eaten up, to me on this line:libpython-clj/src/libpython_clj2/metadata.clj
Line 150 in 97dff5c
[(symbol k) (keyword k)]seems wrong, should be:[(symbol k) (keyword v)]but (keyword x) returns for example "nil" on
true, so defaultstrueare lost.I think
[(symbol k) v]should work, but not sure if for all cases.in python: