On Fri, Dec 15, 2017 at 12:11 PM, Erik Bray <erik.m.b...@gmail.com> wrote:
> 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.

Sorry, let me just clarify again--I'm specifically talking about a
small (AFAIK) handful of cases involving small (typically < 10
element) dicts that happen to be embedded in the reprs of a few
classes (and often internal ones that would rarely be repr'd by a
user).  For anything more significant where it could actually matter
it becomes a separate question.

-- 
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.

Reply via email to