Serhiy Storchaka added the comment:

> Just a suggestion, can we use sys.version_info to get Python major version to 
> have uniform code?

Uniform code is too verbose. WM_CLASS should be "Idle" on Python 2 and "Idle3" 
on Python 3.

    top = Toplevel(self.root, class_='Idle' if sys.version_info[0] <= 2 else 
'Idle%s' % sys.version_info[0])

It is easy to write just the constant literal. It is changed only when the 
major version is changed.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22133>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to