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/1999-July/000586.html below:

[Python-Dev] I'd like list.pop to accept an optional second

[Python-Dev] I'd like list.pop to accept an optional second [Python-Dev] I'd like list.pop to accept an optional secondFred L. Drake Fred L. Drake, Jr." <fdrake@acm.org
Fri, 23 Jul 1999 12:30:17 -0400 (EDT)
Skip Montanaro writes:
 > Why not go all the way to Perl with
 > 
 >     top = list.pop() unless IndexError


  Trying to kill me, Skip?  ;-)
  Actually, the semantics are different.  If we interpret that using
the Perl semantics for "unless", don't we have the same thing as:

	if not IndexError:
	    top = list.pop()

  Since IndexError will normally be a non-empty string or a class,
this is pretty much:

	if 0:
	    top = list.pop()

which certainly isn't quite as interesting.  ;-)


  -Fred

--
Fred L. Drake, Jr.	     <fdrake@acm.org>
Corporation for National Research Initiatives



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