On Sun, Sep 19, 2021, 6:42 PM Andre Delfino <[email protected]> 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 -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/ZDEPZSKX4CHOB637TKQDSMEQ4RUPR4BH/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to