seeking deeper (language theory) reason behind Python design choice
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Tue May 15 03:02:50 EDT 2018
On Mon, 14 May 2018 21:24:01 -0400, Dennis Lee Bieber wrote:
> The problem with adding the feature is that it will start to be
> used by
> newbies who lack the discipline to use it reliably: ensuring that
> comparisons are coded with constants (which for Python really means
> literals) on the left-hand side, so that a type of "=" for "==" will be
> flagged and not transparently pass.
Using = alone is absolutely not on the table.
The current two leading contenders, both controversial, are:
name := expression
name given name = expression
The second is being sponsored, backed, supported and subsidised by the
Department of Repeated Redundancy and Repetitiveness.
(And before you ask, unfortunately "expression as name" has been ruled
out because it is ambiguous with other uses of "as".
--
Steve
More information about the Python-list
mailing list