On 6/27/06, Brett Cannon <[EMAIL PROTECTED]> wrote: > > > (5) I think file creation/writing should be capped rather than > > binary; it is reasonable to say "You can create a single temp file up > > to 4K" or "You can create files, but not more than 20Meg total". > > That has been suggested before. Anyone else like this idea?
What would this code do: MAX = 4 for i in xrange(10): fp = open(str(i), 'w+') fp.write(' ' * (MAX // 4)) fp.close() if i % 2: os.unlink(str(i)) How many times should this execute, 4 or 8? What about if there is no if i % 2 and the file is unlinked at the end of each loop? Should that loop 10 times without error? What would happen if we used the same file name? What would happen if we did something like: fp = open(str(i), 'w+') MAX = 4 for i in xrange(10000): fp.seek(0) fp.write(' ' * (MAX // 4)) Should this succeed? n _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com