discovery: put trivial branch first
Having the simple and tiny branch of the conditional first help readability. The
"else" that appears after a screen of code is harder to relate to a conditional.
#!/usr/bin/env python
import errno, os, sys
for f in sys.argv[1:]:
try:
print f, '->', os.readlink(f)
except OSError as err:
if err.errno != errno.EINVAL:
raise
print f, 'not a symlink'
sys.exit(0)