[Tutor] defined()
Hugo González Monteverde
hugonz-lists at h-lab.net
Tue Apr 4 01:00:14 CEST 2006
Alan Gauld wrote:
> Which language(s) do you know that has such a feature?
> And why do you consider it so useful that you expect to find
> it in Python?
I'm not the original poster, but being a perlhead before, I can say it
exists in Perl. It is very often used too.
I used to miss it at first, but normally I now do the right thing
semantically. Counting on the variable being defined or not is simply
another bit of information. Assigning a value for that case is much cleaner.
It is not used for black magic in Perl, AFAIK. Just normal testing.
Hugo
More information about the Tutor
mailing list