Stanislav Frolov <[email protected]> writes: > It seems to print functions do not call print-object method for hash-table > and > other standard types. I would like to see some human-readable representation > of hash tables. > > (defmethod print-object ((hash hash-table) stream) > (format stream "42")) > ;compiled > > (print (make-hash-table)) > ;evaluated => #<hash-table 0b41ef90> > > Reproduced with latest ECL's version from git. That's correct, portable programs can't define methods which only specialize on standard classes.
(set-pprint-dispatch 'hash-table (lambda (stream object) (print 42 stream))) would do. -- With best regards, Stas. ------------------------------------------------------------------------------ Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now with LearnDevNow - 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122812 _______________________________________________ Ecls-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ecls-list
