Top "Generator" questions

A generator is a generalisation of a subroutine, primarily used to simplify the writing of iterators.

Good way to generate SQL strings in java?

I'm not looking for a persistence layer like Hibernate, I just want to generate SQL-strings and they should be compatible …

java mysql sql generator sqlbuilder
Automatic Java flow chart generator

I'm just looking to see if anyone knows of any free safe Automatic flow chart generators for Software Testing when …

java charts generator flow
Proper type annotation of Python functions with yield

After reading Eli Bendersky's article on implementing state machines via Python coroutines I wanted to... see his example run under …

python generator coroutine static-typing mypy
Which is generally faster, a yield or an append?

I am currently in a personal learning project where I read in an XML database. I find myself writing functions …

python performance return generator yield
How to create a generator/iterator with the Python C API?

How do I replicate the following Python code with the Python C API? class Sequence(): def __init__(self, max): self.…

python c iterator generator python-c-api
In python is there a way to check if a function is a "generator function" before calling it?

Lets say I have two functions: def foo(): return 'foo' def bar(): yield 'bar' The first one is a normal …

python function generator coroutine
What is the difference between a generator and an array?

Today the PHP team released the PHP 5.5.0 version, which includes support for generators. Reading the documentation, I noticed that it …

php arrays iterator generator
Use of yield with a dict comprehension

As a contrived example: myset = set(['a', 'b', 'c', 'd']) mydict = {item: (yield ''.join([item, 's'])) for item in …

python generator yield
How to test API request failures with Redux Saga?

I am trying to test every scenarios my saga could follow, but i am not able to make happens the …

javascript reactjs generator redux redux-saga
Unbounded range()

Is there an unbounded version of range (or xrange for Python 2), or is it necessary to define it manually? For …

python range generator