[DiscordArchive] what do you mean by do until exception?
[DiscordArchive] what do you mean by do until exception?
Archived author: Skarn • Posted: 2018-02-11T11:02:55.675000+00:00
Original source
nope, not exactly like this
Archived author: Amaroth • Posted: 2018-02-11T11:02:57.963000+00:00
Original source
"raise exception, end"
Archived author: Amaroth • Posted: 2018-02-11T11:03:03.104000+00:00
Original source
Close to that though
Archived author: Skarn • Posted: 2018-02-11T11:03:07.217000+00:00
Original source
at leaast not cpython
Archived author: Skarn • Posted: 2018-02-11T11:03:23.216000+00:00
Original source
for thing in things
Archived author: Skarn • Posted: 2018-02-11T11:03:27.447000+00:00
Original source
this would return a generator object
Archived author: Skarn • Posted: 2018-02-11T11:04:17.609000+00:00
Original source
you can manually make your own generators by messing with yield keyword
Archived author: Amaroth • Posted: 2018-02-11T11:04:21.471000+00:00
Original source
What I know for sure is that pure Python always throws an exception when it gets to the end of list in foreach and catches it by ending that foreach. I trust my university teacher with that. Idk about CPython though.
Archived author: Skarn • Posted: 2018-02-11T11:04:38.082000+00:00
Original source
CPython is standard python
Archived author: Skarn • Posted: 2018-02-11T11:04:52.226000+00:00
Original source
I just tested it