In Python 3, it is possible to open a file object using an \"integer file descriptor\" with the format:
stdout = open(1, \"w\")
stdout.write(\"Hello World\")
File handle 0 is stdin. Without redirection stdout, stderr, and stdin are all pointing to the terminal (so will all act the same). However when redirection is used, they will behave differently, because they will no longer be the same.
I.E. If you do python3 testio.py 2> testio.txt, then stdout goes to the file, but stdin is still the terminal.
This is just a bi-product of there being no checking to see that you only read stdin, and only write stdout, and stderr.