Message165565
I suggest append "An empty last part will result in a path that ends with a separator" or something similar to the docstring, though it is already in the HTML documentation.
Suppose someone does this like me:
In [10]: join('a', sep)
Out[10]: '/'
He must be surprised. He has to guess how to append a separator if he does not look at the code, or fiddle around until he finds the soultion.
Given it explained in the docstring, after he sees:
In [10]: join('a', sep)
Out[10]: '/'
He will probably look at the docstring:
In [16]: join?
Type: function
Base Class: <type 'function'>
String Form:<function join at 0x7f053fc93ed8>
Namespace: Interactive
File: /usr/lib/python2.7/posixpath.py
Definition: join(a, *p)
Docstring:
Join two or more pathname components, inserting '/' as needed.
If any component is an absolute path, all previous path components
will be discarded. An empty last part will result in a path that
ends with a separator.
Ok, he immediately knows he has to supply an empty string instead of a separator. |
|
Date |
User |
Action |
Args |
2012-07-16 04:29:29 | fossilet | set | recipients:
+ fossilet, ned.deily, r.david.murray |
2012-07-16 04:29:28 | fossilet | set | messageid: <1342412969.0.0.823048433274.issue15342@psf.upfronthosting.co.za> |
2012-07-16 04:29:28 | fossilet | link | issue15342 messages |
2012-07-16 04:29:26 | fossilet | create | |
|