Joe Smith wrote: > "Steve Holden" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Jim Jewett wrote: >> >>>I think that adding parentheses would help, by at least signalling that >>>the logic is longer than just the next (single) expression. >>> >>> level = (0 if "absolute_import" in self.futures else -1) >>> >> >>Contrast with the bleeding obvious: >> >> level = 0 >> if "absolute_import" in self.futures: >> level = -1 >> >>or even, if a certain obscurity is desirable: >> >> level = - ("absolute_import" in self.futures) >> > > > Wait a second. > > I may be just a user but if the above is correct then that syntax needs to > die! > There is no logical reason for "XX if YY else ZZ" to be roughly equivlent > to: > "if (YY) then {ZZ} else {XX}" , but AFAICT that is pretty much the way you > expanded that. > I hope I misunderstood, or that there was a typo in a post. > There was a typo in the post.
regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd www.holdenweb.com Love me, love my blog holdenweb.blogspot.com _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com