Referring to variables in Python fragments

"John Williams" <[email protected]> Fri, 05 Mar 2004 10:29:39 -0600
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
I'm bothered by having to prefix all my recipe variables with "_no" in
Python code; it's awkward to type, very strange looking for a beginner
such as myself, and probably very easy to accidentally forget.  I have an
alternate suggestion: allow the "$variable" syntax in Python code.  As far
as I can tell, this would just mean replacing "$" with "_no." outside of
string literals.

Taking this a step futher, the "$" could work in string literals, too, so
for example, "the value of X is $X" could become ("the value of X is " +
_no.X).  Another possible improvement would be to allow some of the
extended sytnaxes like $?var and $*var in Python code.

If I wrote a patch for this would it be accepted?

jw



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click