fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] non magical “Lazy” string interpo lation ?


From: Jorge Vargas
Subject: Re: [Fab-user] non magical “Lazy” string interpo lation ?
Date: Wed, 20 May 2009 23:22:44 -0400

Sorry I forgot to reply to the ML too (I have mailmail twice :P)

Hi Jeff,

Sorry I should have searched first. I hate mailman ui...

After reading that thread I totally forgot about
http://docs.python.org/whatsnew/2.6.html#pep-3101-advanced-string-formatting
so I think 2.6 is a nice compromise for those of us that want a
simpler syntax. I also find the implementation on the linked thread
interesting.

How about adding it as a global env variable? that is off by default?
I personally just want to get rid of the % env at the end of almost
every line. and replacing that with .format(env) will actually make
the code almost the same size. In other words I want this
functionality to mimic how the plain shell works with it's variables.
I know it's still magical and first timers could go huh? at it but I'm
sure people will grow to like it as it makes their code a lot cleaner.

On Wed, May 20, 2009 at 11:02 PM, Jeff Forcier <address@hidden> wrote:
> Hi Jorge,
>
> Check out the list history from a week or two back, we had a big
> discussion about this :) [1] Long story short, it used to be in, was
> taken out for a few reasons, may find its way back in but in a more
> explicit and less magical form.
>
> Best,
> Jeff
>
> [1] http://lists.gnu.org/archive/html/fab-user/2009-05/threads.html#00071
>
> On Wed, May 20, 2009 at 10:45 PM, Jorge Vargas <address@hidden> wrote:
>> I find myself doing this type of thing a lot.
>>
>> "%(some_var_from_env)s % env
>>
>> in my small fabfile I have it in append, sudo, run, webbrowser.open,
>> print as well as plain old strings.
>>
>> So I was wondering why not make it part of the commands?
>>
>> a simple replacement in run, that will expand all variable will save
>> 1000s of lines doing it on the outside.
>>
>> PS: sorry for all the emails, I'm just really exited about the
>> potential I have here and I want to get this tool to a point that I
>> can use it for day to day work :)
>>
>>
>> _______________________________________________
>> Fab-user mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/fab-user
>>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]