On 05/26/2015 05:43 PM, richard_riehle wrote:
I realized that I mentioned earlier that I found a solution to my original
question, but that I never posted an example of the solution. So, here is a
simplified example for anyone who is interested.
def fArray(fselect, fparm = 1):
def A
In a message of Tue, 26 May 2015 19:43:31 -0500, richard_riehle writes:
>I realized that I mentioned earlier that I found a solution to my original
>question, but that I never posted an example of the solution. So, here is a
>simplified example for anyone who is interested.
>
>def fArray(fselec
I realized that I mentioned earlier that I found a solution to my original
question, but that I never posted an example of the solution. So, here is a
simplified example for anyone who is interested.
def fArray(fselect, fparm = 1):
def A1(p = fparm):
if p == 1:
On Friday, November 14, 2014 2:17:38 PM UTC-8, Richard Riehle wrote:
> In C, C++, Ada, and functional languages, I can create an array of functions,
> albeit with the nastiness of pointers in the C family. For example, an
> array of functions where each function is an active button, or an array
On Friday, November 14, 2014 4:13:28 PM UTC-8, Dennis Lee Bieber wrote:
> On Fri, 14 Nov 2014 14:17:23 -0800 (PST), Richard Riehle
> declaimed the following:
>
> >In C, C++, Ada, and functional languages, I can create an array of
> >functions, albeit with the nastiness of pointers in the C famil
On 11/14/2014 5:17 PM, Richard Riehle wrote:
In C, C++, Ada, and functional languages, I can create an array of
functions, albeit with the nastiness of pointers in the C family.
For example, an array of functions where each function is an active
button, or an array of functions that behave like f
On 2014-11-14 22:17, Richard Riehle wrote:
In C, C++, Ada, and functional languages, I can create an array of
functions, albeit with the nastiness of pointers in the C family.
For example, an array of functions where each function is an active
button, or an array of functions that behave like for
On Fri, Nov 14, 2014 at 3:17 PM, Richard Riehle wrote:
> In C, C++, Ada, and functional languages, I can create an array of functions,
> albeit with the nastiness of pointers in the C family. For example, an
> array of functions where each function is an active button, or an array of
> functi
I second the call for a more concrete implementation, but if you want the
results of the functions in c3 to be responsive to the values of c1 and c2
(i.e., if you change r1c1, r1c3 returns a different value), it might be worth
encapsulating the whole thing in an object and making the c3 function
Richard Riehle :
> Example:
>
> r1c1 r1c2 r1c3
> r2c1 r2c2 r2c3
> r3c1 r3c2 r3c3
>
> where r1 is row 1 and c1 is column 1. Suppose I want an array where the
> colum three is a set of functions that operates on the other two
> columns, depending on the v
On Feb 25, 11:53 am, [EMAIL PROTECTED] wrote:
> > { '+': operator.add, '-': operator.sub, ... }
>
> Then EXPR OPER EXPR -> ops[ OPER ]( EXPR, EXPR ), right?
I think this is the most Pythonic idiom. You can even define your own
custom binary operators, such as '$' to convert dollars and cents to
> { '+': operator.add, '-': operator.sub, ... }
Then EXPR OPER EXPR -> ops[ OPER ]( EXPR, EXPR ), right?
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] a écrit :
> My parser has found an expression of the form CONSTANT_INTEGER
> OPERATOR CONSTANT_INTEGER. I want to fold this into a single
> CONSTANT_INTEGER.
>
> The OPERATOR token has an intValue attribute, '+' == 0, '-'== 1, etc.
> In C I'd put functions Add, Subtract, ... into
[EMAIL PROTECTED] wrote:
> My parser has found an expression of the form CONSTANT_INTEGER
> OPERATOR CONSTANT_INTEGER. I want to fold this into a single
> CONSTANT_INTEGER.
>
> The OPERATOR token has an intValue attribute, '+' == 0, '-'== 1, etc.
> In C I'd put functions Add, Subtract, ... into a
14 matches
Mail list logo