What is the significance of python3 about the circumstances in which as is used?

python3
win10
spyder

def temp_convert(var):
    try:
        return int(var)
    except ValueError as Argument:    
        print("The argument does not contain number\n",Argument)
    

temp_convert("xyz")

want to know why except ValueError as Argument: why use as to connect, and under what circumstances do you need to use as? (because it was used directly in the original tutorial, connecting ValueError,Argument: error indicates that Argument is not defined)

May.07,2022

as is the variable after the exception object is assigned to as

The reason for

"error prompt Argument not defined" is that except ValueError is no longer allowed in Python3 , and Argument can only be written in except ValueError as Argument

.

teach people to fish is better than teach people to fish python.org/3/reference/compound_stmts.html-sharpthe-try-statement" rel=" nofollow noreferrer "> https://docs.python.org/3/ref...

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a808-2af60.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a808-2af60.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?