New user's initial thoughts / criticisms of Python
Mark Janssen
dreamingforward at gmail.com
Sat Nov 9 15:33:30 EST 2013
A little late, but a couple of cents worth more data:
> I've just got a few thoughts I'd like to share and ask about:
>
> * Why not allow floater=float(int1/int2) - rather than floater=float
> (int1)/float(int2)?
This has to do with evaluation order, the stuff inside the parens gets
evaluated first, resulting in an integer for versions of python less
than v3.
> Give me a float (or an error message) from evaluating everything in the
> brackets. Don't make me explicitly convert everything myself (unless I
> want to)
You only have to give one float value: int1/float(int2). The
environment converts it to a floating point operation when either of
the two is a float value. (try: 1/2.0, for example)
> * No sign of a select .. case statement
>
> Another useful tool in the programmer's toolbox
I agree on this one, though I prefer C's syntax of switch/case. The
if/then/elif "ladder" of python is a bit cumbersome, but was chosen to
reduce language size -- a value with mixed reviews.
> * Call me pedantic by why do we need a trailing comma for a list of one
> item? Keep it intuitive and allow lstShopping=[] or ["Bread"] or
> ["Bread", "Milk","Hot Chocolate"] I don't like ["Bread",]. It bugs me.
This one got answered, it has to do with the parser when dealing with parens.
> Is everyone happy with the way things are?
No, but Python is still the best language.
> Could anyone recommend a good,
> high level language for CGI work? Not sure if I'm going to be happy with
> Perl (ahhh, get him, he's mentioned Perl and is a heretic!) or Python.
Personally, I wouldn't recommend Python for web scripts. But I'm
biased and am speaking from where I see the field of computer
languages heading.
MarkJ
Tacoma, Washington
More information about the Python-list
mailing list