On Thu, Dec 14, 2017 at 10:02 PM, Nils Bruin <nbr...@sfu.ca> wrote: > On Thursday, December 14, 2017 at 3:29:32 AM UTC-8, Erik Bray wrote: >> >> >> To be clear, the code I wrote above specifically pertains to dicts >> that are embedded in the __repr__ of some object. In other words, >> that code goes in the __repr__ implementation, not the example/test. >> This ensures that such objects are always displayed predictably. > > > -1 to letting a basic "__repr__" of any object depend on pprint. "__repr__" > can end up in error objects which may get caught and never printed. The > effort of pprint is not appropriate for those cases.
"the effort of pprint"--is trivial compared to unwinding the stack, etc. > We can easily deal with random orders in documentation by marking the > printing of the dict with "#random" and testing the result for correctness > in a more semantically meaningful way. Nah. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.