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/2005-August/055190.html below:

[Python-Dev] PEP 8: exception style

[Python-Dev] PEP 8: exception style [Python-Dev] PEP 8: exception styleGuido van Rossum gvanrossum at gmail.com
Sat Aug 6 19:10:54 CEST 2005
On 8/6/05, A.M. Kuchling <amk at amk.ca> wrote:
> PEP 8 doesn't express any preference between the
> two forms of raise statements:
> raise ValueError, 'blah'
> raise ValueError("blah")
> 
> I like the second form better, because if the exception arguments are
> long or include string formatting, you don't need to use line
> continuation characters because of the containing parens.  Grepping
> through the library code, the first form is in the majority, used
> roughly 60% of the time.
> 
> Should PEP 8 take a position on this?  If yes, which one?

Definitely ValueError('blah'). The other form will go away in Python
3000. Please update the PEP.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev mailing list

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