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
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
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
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
> 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?
__
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
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
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..