Hacker News new | past | comments | ask | show | jobs | submit login

True, but foo shouldn't be modifying bar anyway; make a copy instead:

  bar = list(bar) if bar else []



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: