In Python 2, generators may not return a value. In order to return a value
from a tasklet, then, it is necessary to raise an instance of this
exception with the return value:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-09-30 UTC."],[[["In Python 2, tasklets cannot directly return a value; instead, they must raise an `ndb.Return` exception with the desired return value."],["The `ndb.Return` exception allows a tasklet in Python 2 to effectively return a value by raising the exception with the value as its argument."],["Python 3 tasklets can simply use the `return` keyword to return a value, unlike in Python 2."],["The provided content discusses how to return from a tasklet in Python 2, providing specific example code."]]],[]]