[New-bugs-announce] [issue25577] os.path.dirname leave left quote and remove right one

Raffaele Mancuso report at bugs.python.org
Sat Nov 7 10:02:51 EST 2015


New submission from Raffaele Mancuso:

Python 3.4.3 (default, Jun 29 2015, 12:16:01) 
[GCC 5.1.1 20150618 (Red Hat 5.1.1-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> dir = "\"ciao/come/stai/ciao.pdf\""
>>> dir
'"ciao/come/stai/ciao.pdf"'
>>> os.path.dirname(dir)
'"ciao/come/stai'

As you can see, dirname has removed the right quote, but not the left one.
The correct behaviour should be
'ciao/come/stai' (no quotes)
OR
'"ciao/come/stai"' (both quotes)
but never
'"ciao/come/stai' (only one quote)

This breaks other bash tools

----------
components: Library (Lib)
messages: 254273
nosy: Raffaele Mancuso
priority: normal
severity: normal
status: open
title: os.path.dirname leave left quote and remove right one
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25577>
_______________________________________


More information about the New-bugs-announce mailing list