Creating a local variable scope.

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Mon Nov 30 05:25:11 EST 2009


On Mon, 30 Nov 2009 02:11:12 +0100, Alf P. Steinbach wrote:

> I think if one could somehow declare names as const (final, readonly,
> whatever) then that would cover the above plus much more.

Having real constants is one feature that I miss. Because Python doesn't 
have constants, I find I've lost the discipline to avoid "magic 
numbers" (and strings) in my code.


-- 
Steven



More information about the Python-list mailing list