why won't slicing lists raise IndexError?
Python
python at bladeshadow.org
Wed Dec 6 18:22:17 EST 2017
On Wed, Dec 06, 2017 at 03:08:51PM -0800, Rick Johnson wrote:
> The following is Terry's original:
>
> if item:
> process(item)
> else:
> do_without_item()
>
> And here is the functioning equivalent, sans any fuzzy
> semantics:
>
> if item:
> process(item)
> else:
> pass
>
THIS IS FALSE. CALLING A FUNCTION IS NOT FUNCTIONALLY EQUIVALENT TO
THE PASS STATEMENT. Therefore your entire premise is false, and the
remainder of what you said is meaningless.
More information about the Python-list
mailing list