This "feature" has been present AFAIK since about the first check-in. I tripped up over this when attempting to add a value to the return and got a type error.
Two suggested approaches:
- Change the documentation, per this pull request.
- As an optional keyword argument, allow for an
int return (default would remain str). I have not included a code example/pull for that.