swaroopch / edn_format

EDN reader and writer implementation in Python, using PLY (lex, yacc)
https://swaroopch.com/2012/12/24/edn-format-python/
Other
131 stars 31 forks source link

Missing support for map namespace syntax #72

Closed eerohele closed 4 years ago

eerohele commented 4 years ago
edn_format.loads('#:foo{:bar 1}')

fails with:

edn_format.exceptions.EDNDecodeError: Illegal character '#' with lexpos 0 in the area of ...#:foo{:bar 1}...

See Map namespace syntax in the Clojure Reader reference.

Ditto for auto-resolving namespaces (that is, #::{:foo 1}), although I'm not sure whether that sort of thing is in the scope of this library.

swaroopch commented 4 years ago

@eerohele I'm not actively using EDN any more, although several others and myself are maintaining this repository, and we welcome pull requests!

bfontaine commented 4 years ago

@eerohele Do you want to try making a PR for this?

eerohele commented 4 years ago

I can give it a shot, although I'm not sure when I'll get to it.

Also, I'm not a super-experienced Pythonista, nor do I have any experience with the libraries edn_format uses. If you can give me any pointers at all on where to get started, that'd be super-helpful.

bfontaine commented 4 years ago

Well, I started an explanation but I implemented the feature while making it 😅

eerohele commented 4 years ago

Hah! Well, I'm definitely not complaining. Thank you very much! I was actually just working on something that could really use this improvement. 👍

bfontaine commented 4 years ago

@eerohele I just pushed edn_format v0.7.1 with this feature 🎉