wish list for python
Andrew Bennetts
andrew-pythonlist at puzzling.org
Fri Oct 24 01:56:25 EDT 2003
On Fri, Oct 24, 2003 at 06:47:27AM +0200, Jim Newton wrote:
> does anyone know where i can find the current wish-list or to-do list
> for futer python releases?
Python Enhancement Proposals:
http://python.org/peps/
and the SourceForge bug/patch trackers:
http://sourceforge.net/bugs/?group_id=5470
http://sourceforge.net/patch/?group_id=5470
And failing all else, try searching the comp.lang.python archives :)
> Does anyone know if there is a play to allow non-evaluatable statements
> to return values? I'm only a week to this language so far but it
> seems very strange to me (coming from a list background) that i cannot
> somehow say
> x = if a:
> then b
> else c
For this particular expression, see PEP 308 (which has been rejected).
> x = for i in some-sequence:
> blah blah blah.
I'm not sure what this is meant to mean, but I suspect PEP 289 would provide
what you're after.
> and what about something like the following?
>
> x = cond:
> a > 1:
> 0
> a > 10:
> 1
> a > 100:
> 2
> True:
> -1
See the second proposed solution in PEP 275, which is still listed as "Open"
-- but Guido doesn't seem keen on the idea:
http://www.python.org/doc/essays/pepparade.html
Besides, this particular example is probably better written as:
try:
x = int(math.log10(a))
except (OverflowError, ValueError):
x = -1
-Andrew.
More information about the Python-list
mailing list