For review: PEP 308 - If-then-else expression
dale at riverhall.NOTHANKS.co.uk
Sat Feb 8 18:52:20 CET 2003
Michael Hudson <mwh at python.net> wrote:
>Dale Strickland-Clark <dale at riverhall.NOTHANKS.co.uk> writes:
>> I am quite surprised at the number of people who have missed important
>> points in this proposal and at the amount of prejudice against
>> suggestions that have already appeared in other languages.
>I'm prejudiced against change, and proud of it. Not to the extent of
>opposing all change without consideration, but my default opinion of
>any change is "no thanks" and the merits of any change have to
Then you are against language development. Why not just take your
current download of Python and leave?
One of the beauties of Python is the way it is growing and evolving.
>And then there's the fact that I really don't think this change is an
You have an odd understanding of enhancement, then.
>I went through quite a large bunch of my code code searching for 'if
>'. I've found *nothing* that I would consider improved by an
>if-then-else expression. Maybe this is just the fact that I'm so
>inured to the lack of an if-then-else expression I have come to see a
>limitation as a virtue -- but I don't think so.
> def get_arg(self, default=1):
> """Return any prefix argument that the user has supplied,
> returning `default' if there is None. `default' defaults
> (groan) to 1."""
> if self.arg is None:
> return default
> return self.arg
Yuck! An pointless function that boils down to:
self.arg or default
in current parlance. Or the same after the proposal. Not a good
example. Are you paid by the code-line?
>> I don't think anyone would describe list comprehension as Pythonic,
>> yet this is perhaps the most useful recent addition to the language.
>Bah. New-style classes and generators both kick list comps' butts :-)
They're good too but they're 'Pythonic' so don't fit my argument.
Riverhall Systems Ltd
More information about the Python-list