On Jun 22, 6:45 am, Tim Roberts <[EMAIL PROTECTED]> wrote:
> dominique <[EMAIL PROTECTED]> wrote:
> >On Jun 21, 1:37 pm, John Machin <[EMAIL PROTECTED]> wrote:
>
> >> Look at the operator module. In your above example:
>
> >> return {
> >>'>': operator.gt,
> >>'=': operator.eq,
> >>'<':
dominique <[EMAIL PROTECTED]> wrote:
>On Jun 21, 1:37 pm, John Machin <[EMAIL PROTECTED]> wrote:
>>
>> Look at the operator module. In your above example:
>>
>> return {
>>'>': operator.gt,
>>'=': operator.eq,
>>'<': operator.lt,
>>}[variable]
>
>Thanks a lot John
>Dominique
Yes,
On Jun 21, 1:37 pm, John Machin <[EMAIL PROTECTED]> wrote:
>
> Look at the operator module. In your above example:
>
> return {
>'>': operator.gt,
>'=': operator.eq,
>'<': operator.lt,
>}[variable]
>
> Cheers,
> John
Thanks a lot John
Dominique
--
http://mail.python.org/mailman/lis
On Jun 21, 9:17 pm, dominique <[EMAIL PROTECTED]> wrote:
> Hello All,
>
> In a wx GUI, I would like to let the user choose between >, < or =.
> So, I created a combobox and when the user chooses ">" for instance, I
> wanted to return > (the objective is to send the operator into another
> complex
Hello All,
In a wx GUI, I would like to let the user choose between >, < or =.
So, I created a combobox and when the user chooses ">" for instance, I
wanted to return > (the objective is to send the operator into another
complex method):
Example:
if variable == ">":
return >
But this is invalid