New user's initial thoughts / criticisms of Python
Mark Lawrence
breamoreboy at yahoo.co.uk
Sat Nov 9 08:41:49 EST 2013
On 09/11/2013 13:08, John von Horn wrote:
> Hi Everyone,
>
> I'm Mr. Noobie here, I've just started easing into Python (2.7.4) and am
> enjoying working along to some youtube tutorials. I've done a little
> programming in the past.
If it's possible I'd strongly recommend Python 3.3, there's lots of
goodies in there like vastly improved unicode handling.
>
> 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)?
Surely this depends on the outcome that you actually want or am I
missing the obvious? Also note that integer division has been changed
in Python 3.
>
> 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 usually have to in Python, it's down to strong typing.
>
> * No sign of a select .. case statement
Loads of recipes online for this, ranging from specialised classes to my
favourite which is spelt "dict".
>
> Another useful tool in the programmer's toolbox
>
> Select DayofWeek
>
> case "mon"
>
> ...
>
> end select
>
> * 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.
It should as it's not needed. I'd guess you're confusing a tuple of one
item with a list of one item?
>
> Just some initial thoughts. I just wanted to know the reasoning behind
> the above, be shown the shortcomings of my ignorance, pointed in the
> right direction. Let the High Priests of Python come forth and speak wise
> words and show me the ignorance of thy ways. Let my cup be filled to
> overflowing with your kind knowledge and wisdom.
Try "import this" from the Python interactive prompt for the Zen of Python.
>
> Is everyone happy with the way things are?
Yes thank you.
> Could anyone recommend a good,
> high level language for CGI work?
I can't comment as to whether or not Python is suitable for CGI work,
I'll leave that to the experts.
> Not sure if I'm going to be happy with
> Perl (ahhh, get him, he's mentioned Perl and is a heretic!) or Python. I
> would very much value any constructive criticism or insights.
Fair enough, Python isn't for everybody. I love it simply because it
suits my mind set, hence I have www.python.org bookmarked as "Home Sweet
Home". I therefore believe it's safe to say that others hate it as it
doesn't suit their mind sets.
>
> And a "thank you", ["sirs","madams"] but pls, not just ["sirs",]
Reread what I wrote above :)
>
> JvH
>
And check out my signature!!!
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
More information about the Python-list
mailing list