A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-October/082832.html below:

[Python-Dev] if-syntax for regular for-loops

[Python-Dev] if-syntax for regular for-loops [Python-Dev] if-syntax for regular for-loopsSteven D'Aprano steve at pearwood.info
Sat Oct 4 05:08:30 CEST 2008
On Sat, 4 Oct 2008 12:26:30 pm Nick Coghlan wrote:

> (Tangent: the above two try/except examples are perfectly legal Py3k
> code. Do we really need the "pass" statement anymore?)

I can't imagine why you would think we don't need the pass statement. I 
often use it:

* For subclassing exceptions:

class MyTypeError(TypeError):
    pass

* As a placeholder for code I haven't written yet.
* As a no-op used in, e.g. the timeit module.

And probably a few other places as well.



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