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

Barry A. Warsaw bwarsaw@cnri.reston.va.us (Barry A. Warsaw)
Thu, 22 Jul 1999 14:36:09 -0400 (EDT)

>>>>> "Gordo" == Gordon McMillan <gmcm@hypernet.com> writes:

    Gordo> Which are you asking for: breaking code that expects
    Gordo> IndexError Violating Pythonic expectations by, in effect,
    Gordo> creating 2 methods
    Gordo>  list.pop(void)
    Gordo>  list.pop(default_return)

The docs /do/ say that list.pop() is experimental, so that probably
gives Guido all the out he'd need to change the semantics :).  I
myself have yet to use list.pop() so I don't know how disasterous the
change in semantics would be to existing code.