[issue6518] Enable 'with' statement in ossaudiodev module

2009-07-18 Thread Jerzy Jalocha N
New submission from Jerzy Jalocha N jjalo...@gmail.com: Actually, it is not possible to use the 'with' statement in the ossaudiodev module: import ossaudiodev with ossaudiodev.open('/dev/dsp', 'r') as device: ... pass ... Traceback (most recent call last): File stdin, line 1 in module

[issue6519] Reorder 'with' statement for files in Python Tutorial

2009-07-18 Thread Jerzy Jalocha N
New submission from Jerzy Jalocha N jjalo...@gmail.com: Actually, the Python Tutorial recommends the use of the 'with' statement in Section 7.2.1. Methods of File Objects: It is good practice to use the with keyword when dealing with file objects. [etc.] But the example and description