[Python-ideas] 'from os.path import FILE, DIR' or internal structure of filenames

anatoly techtonik techtonik at gmail.com
Tue Oct 22 21:12:18 CEST 2013


On Mon, Sep 30, 2013 at 1:18 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>
> On 30 Sep 2013 05:14, "Terry Reedy" <tjreedy at udel.edu> wrote:
>>
>> On 9/29/2013 1:36 PM, anatoly techtonik wrote:
>>>
>>> On Sun, Sep 29, 2013 at 9:15 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>>>>
>>>> On 29 September 2013 13:28, INADA Naoki <songofacandy at gmail.com> wrote:
>>>>>
>>>>> os.path.abspath(__file__) returns wrong path after chdir.
>>>>> So I don't think abspath of module can be trivially and reliably
>>>>> derived
>>>>> from existing values.
>>>>
>>>>
>>>> Hence the part about any remaining instances of non-absolute __file__
>>>> values being considered a bug in the import system.
>>>
>>>
>>> Bug that will not be fixed, i.e. a wart.
>>
>>
>> Nick said "we tend not to fix them in maintenance releases", which I take
>> to mean we can fix in new versions.
>
> Correct, it's the kind of arguably backwards incompatible bug fix that users
> will generally tolerate in a feature release but would be justifiably upset
> about in a maintenance release.
>
> Cheers,
> Nick.
>
>>
>>
>>> And as a result we don't have a way to reliably reference filename
>>> of the current script and its directory. Hence the proposal.
>>
>>
>> The proposed addition would not happen in maintenance releases either.

Python 3.4?
--
anatoly t.


More information about the Python-ideas mailing list