Magnus L. Hetland mlh at
Tue Nov 16 01:03:44 CET 1999


Is there a function or method in the standard language that can
non-destructively return a list without a specified element? Would it
be possible to add it as a method to lists?


# pseudocode

class list:
    def without(self,element):
        temp = self[:]
        return temp

It might be useful - and sure beats using a temp-variable ;)


  Magnus          Echelon jamming noise:
  Lie             FBI CIA NSA Handgun Assault Bomb Drug Terrorism
  Hetland         Special Forces Delta Force AK47 Hillary Clinton 

More information about the Python-list mailing list