On Sun, Sep 19, 2021, 6:42 PM Andre Delfino <adelf...@gmail.com> wrote:

> Your code has an unpacking error in the first line. I think you mean this,
> right?
>
> no_items = object()
> item = no_items
>
> for item in get_items():
>     frob(item)
>
> if item is no_items:
>     raise ValueError()
>

Sorry yes. Actually I intended to write this but it's the same thing.

no_items = item = object()

>
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/ZDEPZSKX4CHOB637TKQDSMEQ4RUPR4BH/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to