➜

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.

作者 hynek
收信人 eric.araujo, hynek
日期 2011-08-23.08:31:35
SpamBayes Score 0.00058181555
Marked as misclassified 否
Message-id <1314088296.33.0.827828554648.issue12824@psf.upfronthosting.co.za>
In-reply-to
内容
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.
历史
日期 用户 动作 参数
2011-08-23 08:31:36hynek修改recipients: + hynek, eric.araujo
2011-08-23 08:31:36hynek修改messageid: <1314088296.33.0.827828554648.issue12824@psf.upfronthosting.co.za>
2011-08-23 08:31:35hynek链接issue12824 messages
2011-08-23 08:31:35hynek创建