In case f is a file, it will be appear closed outside the with statement.
For example, this
f = 42
print f
with open('6432134.py') as f:
print f
print f
would print:
42
<open file '6432134.py', mode 'r' at 0x10050fb70>
<closed file '6432134.py', mode 'r' at 0x10050fb70>
You can find the details in PEP-0343 under the section Specification: The 'with' Statement. Python scope rules (which might be irritating) apply to f as well.
To answer Heikki's question in the comments: yes, this scoping behavior is part of the python language specification and will work on any and all compliant Pythons (which includes PyPy, Jython, and IronPython).
Yes, the context manager will be available outside the with statement and that is not implementation or version dependent. with statements do not create a new execution scope.