[Python-ideas] Draft PEP on string interpolation

Mike Miller python-ideas at mgmiller.net
Tue Aug 25 20:02:27 CEST 2015


On 08/25/2015 01:29 AM, Paul Moore wrote:
>> Remember Nick Coghlan's statement that the "easy way should be the right
>> way"? That's what this is trying to accomplish.
>
> But the right way is not to use os.system, so I don't *want* it to be

Ok, a few hours before someone complained to Nick that he was using 
subprocess.call as an example when it didn't completely apply.  So I moved to 
the other alternative example that could be helped, os.system.  I have no 
particular love for it, and am not recommending it.  It was just one function 
out of many that needs input to be escaped as far as I was concerned.

I didn't forsee that that the function would be focused on to the point of the 
derailing the idea.  I suppose I'll try again if you'll bear with me.

> If your e-string proposal works for this (via some consequence of
> implicitly calling str()) then it may still be on the cards - but the
> need for explicit str() calls in pathlib is a source of frustration

In my original message (of this sub-thread) this is one of the main paragraphs:

 > To make it as simple as possible to use by end-developers, it 1) doesn't require
 > str() to be run explicitly, it renders itself when needed via its various
 > methods and operators.  Look for .raw, if you need the original.

Also if you check the example script at the bitbucket url, you'll see it is the 
case, though I've not yet implemented every case.

-Mike



More information about the Python-ideas mailing list