Re: [Python-Dev] C.E.R. Thoughts

2005-10-13 Thread Josiah Carlson
Technical Support of Intercable Co <[EMAIL PROTECTED]> wrote: > > And why not > if len(sys.argv) > 1 take sys.argv[1] == 'debug': > ... > > It was not so bad :-) > > A = len(sys.argv)==0 take None or sys.argv[1] > > Sorry for being noisy :-) The syntax for 2.5 has already been decided upo

[Python-Dev] C.E.R. Thoughts

2005-10-13 Thread Technical Support of Intercable Co
And why not if len(sys.argv) > 1 take sys.argv[1] == 'debug': ... It was not so bad :-) A = len(sys.argv)==0 take None or sys.argv[1] Sorry for being noisy :-) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listi

Re: [Python-Dev] C.E.R. Thoughts

2005-10-11 Thread Nick Coghlan
jamesr wrote: > Congragulations heartily given. I missed the ternary op in c... Way to > go! clean and easy and now i can do: > > if ((sys.argv[1] =='debug') if len(sys.argv) > 1 else False): > pass > > and check variables IF AND ONLY if they exist, in a single line! > > but y'all knew th

Re: [Python-Dev] C.E.R. Thoughts

2005-10-10 Thread skip
Andrew> Umm... Is this a joke? I hope so. I must admit the OP's intent didn't make itself known to me with the cursory glance I gave it. Jp's formulation is how I would have written it. Assuming of course, that was the OP's intent. Skip ___ Pyth

Re: [Python-Dev] C.E.R. Thoughts

2005-10-10 Thread Andrew Koenig
> Congragulations heartily given. I missed the ternary op in c... Way to > go! clean and easy and now i can do: > if ((sys.argv[1] =='debug') if len(sys.argv) > 1 else False): > pass > and check variables IF AND ONLY if they exist, in a single line! Umm... Is this a joke? __

Re: [Python-Dev] C.E.R. Thoughts

2005-10-10 Thread Jp Calderone
On Sat, 8 Oct 2005 20:04:13 -0400, jamesr <[EMAIL PROTECTED]> wrote: >Congragulations heartily given. I missed the ternary op in c... Way to >go! clean and easy and now i can do: > >if ((sys.argv[1] =='debug') if len(sys.argv) > 1 else False): > pass > >and check variables IF AND ONLY if they

Re: [Python-Dev] C.E.R. Thoughts

2005-10-10 Thread Oleg Broytmann
On Sat, Oct 08, 2005 at 08:04:13PM -0400, jamesr wrote: > if ((sys.argv[1] =='debug') if len(sys.argv) > 1 else False): > pass Very good example! Very good example why ternary operators must be forbidden! Oleg. -- Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROTEC

[Python-Dev] C.E.R. Thoughts

2005-10-10 Thread jamesr
Congragulations heartily given. I missed the ternary op in c... Way to go! clean and easy and now i can do: if ((sys.argv[1] =='debug') if len(sys.argv) > 1 else False): pass and check variables IF AND ONLY if they exist, in a single line! but y'all knew that..