Update list.pxd

Bugs noticed by Ami Tavory.