[Python-ideas] Python Users Aren't Perfect
phd at phdru.name
Sat Dec 10 15:42:30 CET 2011
On Sat, Dec 10, 2011 at 02:16:21PM +0000, Richard Prosser wrote:
> 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.
What really is disappointing is the number of people who criticize
Python without knowing it.
> 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.
You do not understand the syntax. Parens do not construct tuples -
commas do. So for every tuple - even of length 1 - you must have a
comma. The only exception is an empty tuple (of length 0).
> Something that I personally wish for is the ability to declare variable
> types 'up front' but that facility is missing from Python.
You can use annotations. See PEP 3107. Twas implemented in Python 3.0.
Oleg Broytman http://phdru.name/ phd at phdru.name
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-ideas