No swap function in Python?

Michael Hudson mwh at
Wed May 30 19:10:09 CEST 2001

Thomas Wouters <thomas at> writes:

> On Wed, May 30, 2001 at 04:57:41PM +0200, Bolton, Gawain [ADC:4808:EXCH] wrote:
> > There doesn't seem to be a "swap" function in Python two swap the values
> > of two variables.   I was wondering why this is.
> Because it isn't necessary.

Or possible, in any helpful sense of the word.


  You have run into the classic Dmachine problem: your machine has
  become occupied by a malevolent spirit.  Replacing hardware or
  software will not fix this - you need an exorcist. 
                                       -- Tim Bradshaw, comp.lang.lisp

More information about the Python-list mailing list