Fix bug in Resource.__getitem__ and move docstring example to module doctest
Fix print in resource doctest for py3