everyone (seems to) use itI beg to differ. It was mentioned at a Python conference I went to last year and hardly anyone had heard of it, let alone actually used it. Don't believe all the hype.
"The Zen of Python" (
import this) is often quoted. The line "There should be one-- and preferably only one --obvious way to do it." (obviously a stab at Perl) is broken so often in Python 2.6 and 3.1 that it is getting to be a TMTOWTDI language. The "cleaness" is an illusion, is using triple quotes clean? Perl is honest about using sigils, but Python uses them as well, leading underscores mean different things, depending on how many and where they are in the variable name. It uses @ as a decorator sigil - different to Perl's use and Ruby's use. Of course without mandatory sigils you cannot have interpolation, so Python does not have that. The lack of curley braces means you cannot define a variable just for a conditional block, and you can't have a case statement. Actually, come to think of it, there is no way to just define a variable (see the requirement for Python 3 function
nonlocal and the discussion in PEP 3104). Anyone who thinks the new
format syntax is clear and clean has never tried to teach it to novices. Sorry, I'm ranting...
Superficially Python
is a clean language, its just that when you stretch it then it is as dirty as the rest.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.