Is it better to use a comma as? after try-exception?

Asked 1 years ago, Updated 1 years ago, 78 views

Usually from exception

try:
    pass
except Exception, exception:
    pass
try:
    pass
except Exception as exception:
    pass

They use it in these two ways. Which one is the standard?

The second source code is okay to run at 2.6, but in 2.5, it's called invalid, so I'm thinking about what to use.

hashmap python

2022-09-22 22:14

1 Answers

The second source code you asked is syntax supported from Python 2.6.


2022-09-22 22:14

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.