Re: test assignmet problem

2006-04-25 Thread Duncan Booth
bruno at modulix wrote: > Almost : > > a = b() > if a: > do_stuff_with_b(a) > else: > a = c() > if a: > do_stuff_with_c(a) > else: > do_other_stuff() > > > Now there are probably better ways to write this, but this would require > more knowledge about your real code. if there a

Re: test assignmet problem

2006-04-25 Thread bruno at modulix
Paolo Pantaleo wrote: (snip) > Thnx for the help, > actually the problme is not solved > > i have [well I want to do...] something like: > > if a=b(): >do stuff with a > else if a=c(): >do stuff with b where does this 'b' come from ? > else: >do other stuff > > well, two solutions

Re: test assignmet problem

2006-04-24 Thread Paolo Pantaleo
2006/4/23, Paul McGuire <[EMAIL PROTECTED]>: > > "Paolo Pantaleo" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > So I tried this > > if(not (attr=global_re.match(line)) ): > break > > it says invalid syntax [on the =] > ... because this syntax is not valid ..

Re: test assignmet problem

2006-04-23 Thread Paul McGuire
"Paolo Pantaleo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] So I tried this if(not (attr=global_re.match(line)) ): break it says invalid syntax [on the =] ... because this syntax is not valid ... so it is not possible to do test and assignment in C style?

Re: test assignmet problem

2006-04-23 Thread Duncan Booth
Paolo Pantaleo wrote: > So I tried this > > if(not (attr=global_re.match(line)) ): > break > > it says invalid syntax [on the =] > so it is not possible to do test and assignment in C style? > how can I write this otherwise? > With fewer parentheses for a start, but all you

test assignmet problem

2006-04-23 Thread Paolo Pantaleo
So I tried this if(not (attr=global_re.match(line)) ): break it says invalid syntax [on the =] so it is not possible to do test and assignment in C style? how can I write this otherwise? Thnx PAolo -- if you have a minute to spend please visit my photogrphy site: http://mypi