Message142795
| 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:36 | hynek | set | recipients:
+ hynek, eric.araujo |
| 2011年08月23日 08:31:36 | hynek | set | messageid: <1314088296.33.0.827828554648.issue12824@psf.upfronthosting.co.za> |
| 2011年08月23日 08:31:35 | hynek | link | issue12824 messages |
| 2011年08月23日 08:31:35 | hynek | create |
|