ForNext
Only Do What Only You Can Do
022. undefined test
Hyperpolyglot Interpreted Languages: PHP, Perl, Python, Ruby より (2012.05.08)
VBScript
JScript
Perl
same as null test; no distinction between undefined variables and variables set to undef
PHP
same as null test; no distinction between undefined variables and variables set to NULL
Python
not_defined = False try: v except NameError: not_defined = True
Ruby
! defined?(v)