You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while Clojure can be controlled with *print-namespace-maps* (the namespace can come at the front of the map if all key entries belong to the same namespace)
This PR introduces the `INamed` interface (similar to Clojure's `Named`)
which is applied to the Keyword and Symbol classes. Having an interface
for this allows us to perform type checking for relevant features (in
particular, the existence of a name or namespace) without needing the
import either class directly (thus avoiding circular dependencies).
I also added type annotations for the Lisp representation keyword
arguments (which is a useful addition ahead of #882 merging).
Fixes#884
Co-authored-by: Christopher Rink <christopher@ChristophersMBP.cjlocal>
Hi,
could you please review draft support for the *print-namespace-maps*
dynamic variable. It resolves#882.
I implemented the support at the lowest `obj.py` level, though this
required to bring in the `keyword.py` and `symbol.py` modules resulting
to cyclic dependencies. Not sure how else to implement it, so any other
suggestions are most welcome.
I've also blindly followed the example of *print-dup* on how I ended
setup the variable in the cli/runtime/object .py files.
In addition, I've used a set to compare the printed output of the map
result with multiple k/v, exhaustively covering the possible orderings,
is there perhaps a better simpler way to do this? This currently is
prune to user errors.
Thanks
---------
Co-authored-by: ikappaki <ikappaki@users.noreply.github.com>
Hi,
Basilisp does not have an option to print maps as namespaced maps, as in clojure with
*print-namespace-maps*
e.g. in Basilisp always output the standard map format
while Clojure can be controlled with
*print-namespace-maps*
(the namespace can come at the front of the map if all key entries belong to the same namespace)This probably requires some work at obj.py:
map_lrepr()
that I plan to have a look at.thanks
The text was updated successfully, but these errors were encountered: