On Sat, Jul 1, 2017 at 2:17 AM, Stefan Ram <r...@zedat.fu-berlin.de> wrote:
>   However, to my defense, I must say that in this post my intend
>   was to demonstrate what is happening /behind the curtains/ when
>   the »for« loop is running, so in this special case, it might be
>   appropriate to use a function that otherwise should only be
>   called by the Python interpreter. (But I don't actually know
>   whether the »for« loop uses »__iter__« or »iter« or some other
>   means.)
It basically uses iter().

https://docs.python.org/3/c-api/object.html#c.PyObject_GetIter

"""This is equivalent to the Python expression iter(o)."""

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to