IIRC there's a limited buffer used for the formatting. Also, if a dynamically created type name is 1000000 characters long I'd rather see it truncated than blow up my shell window.<br><br>On Friday, February 20, 2015, Eric V. Smith <<a href="mailto:eric@trueblade.com">eric@trueblade.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 02/20/2015 09:05 AM, Brett Cannon wrote:<br>
>     Some messages (only in C) truncate actual type name (%.50s, %.80s,<br>
>     %.200s, %.500s). Should type name be truncated at all and for how limit?<br>
><br>
><br>
> I assume this is over some worry of string size blowing out memory<br>
> allocation or something? If someone can show that's an actual worry then<br>
> fine, otherwise I say don't truncate.<br>
<br>
I asked about this years ago, and was told it was in case the type name<br>
pointer was bad, and to limit the amount of garbage printed. Whether<br>
that's an actual problem or not, I can't say. It seems more likely that<br>
you'd get a segfault, but maybe if it was pointing to reused memory it<br>
could be useful.<br>
<br>
Eric.<br>
<br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'Python-Dev@python.org')">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/guido%40python.org" target="_blank">https://mail.python.org/mailman/options/python-dev/guido%40python.org</a><br>
</blockquote><br><br>-- <br>--Guido van Rossum (on iPad)<br>