def is_oct(ip):
try:<EOL><INDENT>dec = int(str(ip), <NUM_LIT:8>)<EOL><DEDENT>except (TypeError, ValueError):<EOL><INDENT>return False<EOL><DEDENT>if dec > <NUM_LIT> or dec < <NUM_LIT:0>:<EOL><INDENT>return False<EOL><DEDENT>return True<EOL>
Return true if the IP address is in octal notation.