[Tutor] Variable reference

Alan Gauld alan.gauld at btinternet.com
Tue Jul 7 02:38:01 CEST 2015


On 07/07/15 01:18, Danny Yoo wrote:
> I'd also add that the 'del' statement has near-zero utility.
>
> 'del' is a language blemish.  It should not be used by beginners,
> because it asks them to try to manually manage the lifetime of their
> variable names.  That's an unreasonable and ridiculous burden.
> Functions have local variables for a reason.

I don't know that I'd go that far. There are valid uses for
it in deleting things from dictionaries and the like.
But I agree its not needed very often and can lead to
users over-managing their data.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list