0

I have a rows object and want to delete a row from it, similar to removing items from a list. Regular python method rows.remove(row) doesn't work and I don't want to use DAL's built in delete methods since they delete the whole record.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
DiMarzio
  • 153
  • 1
  • 10

1 Answers1

1

Use the exclude method:

rows.exclude(lambda r: r.id == some_id)

Of course, you can filter by any condition you like.

Anthony
  • 25,466
  • 3
  • 28
  • 57