Python: ObjectAPI to ValueAPI: UnguardedNextInGenerator#2991
Conversation
RasmusWL
left a comment
There was a problem hiding this comment.
This query could use some autoformat 😉
I'm also curious, how would it handle using a default for next, such as next(iter([]), 'foo')?
@RasmusWL I suppose it would still flag an error, but this might be undesired. Should we add a new test case to remove false positives? |
Yes. I think we should at least have a test-case for this. |
RasmusWL
left a comment
There was a problem hiding this comment.
Nice!
I could see myself using the keyword argument to highlight was is going on, so I made some suggestions that would handle that 😉
Co-Authored-By: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
Co-Authored-By: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
This PR is part of the Exceptions modernization effort.