A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2000-May/003861.html below:

[Python-Dev] Traceback style

[Python-Dev] Traceback styleGreg Ward gward@mems-exchange.org
Tue, 2 May 2000 08:27:51 -0400
On 02 May 2000, Ka-Ping Yee said:
> I propose the following stylistic changes to traceback
> printing:
> 
>     1.  If there is no function name for a given level
>         in the traceback, just omit the ", in ?" at the
>         end of the line.

+0 on this: it doesn't really add anything, but it does neaten things
up.

>     2.  If a given level of the traceback is in a method,
>         instead of just printing the method name, print
>         the class and the method name.

+1 here too: this definitely adds utility.

>     3.  Instead of beginning each line with:
>         
>             File "foo.py", line 5
> 
>         print the line first and drop the quotes:
> 
>             Line 5 of foo.py

-0: adds nothing, cleans nothing up, and just generally breaks things
for no good reason.

>         In the common interactive case that the file
>         is a typed-in string, the current printout is
>         
>             File "<stdin>", line 1
>         
>         and the following is easier to read in my opinion:
> 
>             Line 1 of <stdin>

OK, that's a good reason.  Maybe you could special-case the "<stdin>"
case?  How about

   <stdin>, line 1

?

        Greg



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4