[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tutor] Error Python version 3.6 does not support this syntax.

On 11/27/18 5:50 AM, srinivasan wrote:
> Dear Python Experts,
> As still I am newbie and learning python, I am trying to reuse the
> Bluetoothctl wrapper in Python from the link (
> https://gist.github.com/egorf/66d88056a9d703928f93) I am using python3.6
> version, In pycharm editor on the bold highlighted code snippets I see the
> error message "Python version 3.6 does not support this syntax.",

once again you've posted in a way that inserts lots of extra crud, you
avoided that last time.

The syntax change is simple (and works on most older Pythons too):

except ErrorType, e:


except ErrorType as e:

> Could you please how help me how the below highlighted lines of code can be
> can be ported to python3.6 version?
> *        except BluetoothctlError, e:*
> *            print(e)*
> *            return None*