Added support for closing files and streams.
Made the low-level write operation return the number of bytes written, also
declaring the IOError that can be raised.
1a=4 2 3deff(x): 4ifnotx: 5defg(y): 6returnx,y,a 7returng# UnboundLocalError: not defined if x is true 8 9result=f(1)(2) 10assertresult==(1,2,4)