New submission from Muhammad Hallaj Subery:
I think the default behavior of os.path.join() when None is passed as the first
argument should be to translate it to '' by default.
>>> import os
>>> os.path.join(None, 'somewhere')
'somewhere'
vs the current
>>> import os
>>> os.path.join(None, 'somewhere')
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.7/posixpath.py", line 68, in join
elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'
--
components: Library (Lib)
messages: 185316
nosy: hallaj
priority: normal
severity: normal
status: open
title: os.path.join() converts None to '' by default
type: enhancement
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python
3.4, Python 3.5
___
Python tracker
<http://bugs.python.org/issue17556>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com