¡@

Home 

python Programming Glossary: a.send

Attempting to understand yield as an expression

http://stackoverflow.com/questions/12324096/attempting-to-understand-yield-as-an-expression

reference material a x for x in range 10 next a 0 next a 1 a.send 1 2 next a 3 So it looks like generator.send was ignored. That.. a 0 print next a None print next a 1 print next a None a.send 1 #this send is ignored Why ... there's a yield to catch it..... a yield to catch it... 2 print next a None print next a 3 a.send 1 #this send isn't ignored 1 I understand this is pretty far..