clj-python / clj-python/libpython-clj
cannot get key from dictionary
Open
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 1.2k
- Forks
- 74
- PR merge metrics
- No merged PRs in 30d
Description
The below code seems to be inconsistent.
Converting a Clojure map to a python dictionary shows presence of key "a".
But then I can not get the key "a" out of it.
(-> {:a 1}
py/as-python
(py/py. keys)
seq)
;; => ("a")
(-> {:a 1}
py/as-python
(py/py. get "a")
seq)
;; => nil
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the two Clojure examples from the issue and compare the result of keys with the result of get on the converted Python dictionary. Trace the map-to-Python conversion and key lookup behavior; done means looking up "a" returns the value 1 consistently with the key listing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure, python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100