local does not really do anything for you. Better... either way.. you can argue that it is more readable with local. Not very convincingly, but one could argue it.
I am not a fan of weird operators. By weird, I mean, I would find it odd that
yourclass >> something;
would produce text prompts.
You would expect it to just move data silently.
For this type of function, I would have just called it "getdata" or "putdata" or something instead of trying to operator it.