‘builtin_function_or_method’ object is not iterable

stuff ends up a method of function so you would need to call it:

    for item in stuff():
        print(item)

Which based on your comment is the dict.items.

So you can unpack:

 for k,v  in stuff():
     print(k,v)

Or just call when you assign:

 stuff = self.context.get("request").data.stuff()

 for k,v  in stuff:
     print(k,v)

Leave a Comment