Jul-16-2018, 08:34 PM
If you have a consistent and documented code style, you can do whatever you want. If you want to reference PEP 8, which is what we default to on this forum, then you probably want to use snake_case for generators (which are basically functions). I'd consider it this way - if it's a type (class) that you can pass to isinstance, then use CamelCase, otherwise use snake_case (I give this advice for Python code, even though Python types like int and str are not CamelCase).
(Jul-16-2018, 08:28 PM)porton Wrote: Otherwise, I would need to rename every time I switch between a generator function and an iterator class.I don't understand what you mean by this.