This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author hynek
Recipients eric.araujo, hynek
Date 2011-08-23.08:31:35
SpamBayes Score 0.00058181555
Marked as misclassified No
Message-id <1314088296.33.0.827828554648.issue12824@psf.upfronthosting.co.za>
In-reply-to
Content
test_shutil contains a handy helper function called write_file(filename. contents). If *filename* is a tuple, os.path.join() is used to concatenate it to a path.

To be really useful, the resulting file name should be returned, so the user can work with it.

So instead of:
fn = os.path.join(x,y)
write_file(fn, 'contents')

I'd prefer:
fn = write_file((x,y), 'contents')

I have attached a simple patch that achieves this and also applied the resulting simplification to some of the tests.
History
Date User Action Args
2011-08-23 08:31:36hyneksetrecipients: + hynek, eric.araujo
2011-08-23 08:31:36hyneksetmessageid: <1314088296.33.0.827828554648.issue12824@psf.upfronthosting.co.za>
2011-08-23 08:31:35hyneklinkissue12824 messages
2011-08-23 08:31:35hynekcreate