[Python-ideas] Python Isn't Perfect: adding a 'gotchas' section to the tutorial
richard.prosser at mail.com
Sat Dec 10 15:16:21 CET 2011
Although I love Python there are some aspects of the language design which
are disappointing and which can even lead to problems in some cases.
A classic example is a mutable default argument having the potential to
produce unexpected side-effects, as a consequence of the non-intuitive
Another awkward 'feature' is the requirement for a trailing comma in
singleton tuples, due I believe to the use of expression parentheses rather
than (say) the use of special brackets like chevrons.
Something that I personally wish for is the ability to declare variable
types 'up front' but that facility is missing from Python.
This is an important issue, so I propose that the Python tutorial be
updated to highlight such problems. I would be willing to write a draft
section myself but obviously it would need to be reviewed.
I am not sure if this is the appropriate place to make such a comment but
it seems to be a good starting point. Any advice on making a more formal
proposal would be welcome.
PS Is it too late to fix such warts in version 3?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas