[issue16580] Add examples to int.to_bytes and int.from_bytes

2013-05-25 Thread W. Owen Parry
W. Owen Parry added the comment: Patch adding examples + tests for equivalence. Comments appreciated. In particular, I'm not sure that the from_bytes example is simple enough to be useful: def from_bytes(bytes, byteorder, signed=False): if byteorder == 'little':

[issue17545] os.listdir and os.path.join inconsistent on empty path

2013-05-25 Thread W. Owen Parry
W. Owen Parry added the comment: Patch as described above. Comments appreciated. -- keywords: +patch Added file: http://bugs.python.org/file30367/issue17545.patch ___ Python tracker <http://bugs.python.org/issue17

[issue17545] os.listdir and os.path.join inconsistent on empty path

2013-05-21 Thread W. Owen Parry
W. Owen Parry added the comment: I suggest that this is a documentation issue. I have seen three classes of functions is os and os.path i - those which operate on path names only (os.path.join, os.path.dirname, etc) and do not depend on the state of the file system. Since these are string

[issue17545] os.listdir and os.path.join inconsistent on empty path

2013-05-16 Thread W. Owen Parry
W. Owen Parry added the comment: I started working on a patch for this, but the more I think about it the less I am convinced it is wanted. The issue requests that os.listdir('') be equal to os.listdir('.') The given example of os.path.join doesn't follow this: