[Kde-bindings] [bindings] [Bug 333683] New: PyKDE4 KDialog.None is illegal syntax for python3
Wolfgang Rohdewald
wolfgang at rohdewald.de
Mon Apr 21 09:50:35 UTC 2014
https://bugs.kde.org/show_bug.cgi?id=333683
Bug ID: 333683
Summary: PyKDE4 KDialog.None is illegal syntax for python3
Classification: Unclassified
Product: bindings
Version: 4.13.0
Platform: unspecified
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: pykde
Assignee: kde-bindings at kde.org
Reporter: wolfgang at rohdewald.de
as the summary says. In python3, None is illegal for user defined attributes.
Please define a new name like NoButton for both python2-pykde4 and
python3-pykde4 (and KF5 of course), otherwise it is more difficult to write
portable python code.
See https://docs.python.org/3.2/library/constants.html
actually this was illegal even with Python2.7, but it seems its C bindings did
not enforce that, letting pykde4 get through with that bug:
https://docs.python.org/2.7/library/constants.html
Please check if there are more such definitions for constants None, False, True
This fails with python 3.4.0:
i5:[Exit 1 (SIGHUP)]~/vpn/kajongg/src (master) cat xx.py ; python3 xx.py
from PyKDE4.kdeui import KDialog
# print(KDialog.Default) this works as expected
print(KDialog.None) # this fails with a syntax error
File "xx.py", line 3
print(KDialog.None) # this fails with a syntax error
^
SyntaxError: invalid syntax
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Kde-bindings
mailing list