On 8/26/2016 4:50 AM, d...@forestfield.co.uk wrote:
In a program I'm converting to Python 3 I'm examining a list of divisor values, 
some of which can be None, to find the first with a value greater than 1.

Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
None > 1
False

The response 'False' is not a defined part of the language and no program should depend on it. An earlier version of CPython and another implementation of Python 1 or 2 might have said 1 or True. Then your 'first divisor > 1' would be None. Not good.

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to