Clojure

pprint a GregorianCalendar results in Arity exception

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Patch:
    Code

Description

What I was doing: attempting to pretty-print nested structures from Things mac app, which include instances of java.util.GregorianCalendar.
What I expected to happen: output should have an #inst very much like printing java.util.Date.
What happened instead: ArityException Wrong number of args (4) passed to: pprint$pretty-writer$fn

thingsplay.core=> (def nowish (java.util.GregorianCalendar.))
#'thingsplay.core/nowish
thingsplay.core=> nowish
#inst "2014-03-25T22:43:29.240-05:00"
thingsplay.core=> (require 'clojure.pprint)
nil
thingsplay.core=> (pprint nowish)
ArityException Wrong number of args (4) passed to: pprint$pretty-writer$fn  clojure.lang.AFn.throwArity (AFn.java:437)
#inst "
thingsplay.core=> (simple-dispatch nowish)
#inst "2014-03-25T22:43:29.240-05:00"nil
thingsplay.core=> nowish
#inst "2014-03-25T22:43:29.240-05:00"
thingsplay.core=> (write nowish)
ArityException Wrong number of args (4) passed to: pprint$pretty-writer$fn  clojure.lang.AFn.throwArity (AFn.java:437)
#inst "
  1. 0001-CLJ-1390.patch
    29/Mar/14 4:18 PM
    0.9 kB
    Norman Richards
  2. 0002-CLJ-1390-test.patch
    04/Apr/14 8:30 PM
    0.9 kB
    Norman Richards
  3. 0002-CLJ-1390-test2.patch
    07/Apr/14 10:49 AM
    1 kB
    Norman Richards
  4. CLJ-1390-pprint-GregorianCalendar.patch
    10/Apr/14 4:38 PM
    2 kB
    Steve Miner

Activity

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated: