Re: python 3, subclassing TextIOWrapper.

2009-03-23 Thread lambertdw
For D. Murray's suggestion---I think that we programmers have to learn the idiom. We don't always control open, such as subprocess.Popen(). Thank you. I hope these thoughts help with issue 5513 and the related questions to follow about complete removal of file in python3. Opening the file in

Re: python 3, subclassing TextIOWrapper.

2009-03-22 Thread lambertdw
Return value of open undocumented? The return value of open() is a stream, according to http://docs.python.org/dev/py3k/library/io.html#module-io Seems like time for a bug report. -- http://mail.python.org/mailman/listinfo/python-list

python 3, subclassing TextIOWrapper.

2009-03-21 Thread lambertdw
''' A python 3 question. Presume this code is in file p.py. The program fails. $ python3 p.py ... ValueError: I/O operation on closed file. Removing the comment character to increase the stream reference count fixes the program, at the expense of

Re: if expression source format

2008-12-11 Thread lambertdw
Consider following snippets: # must examine code carefully to see that result has a value if condition: result = expression1 else: result = another_expression return result # result has a value but difficult to understand how it comes about result =