Error Python version 3.6 does not support this syntax.

Terry Reedy tjreedy at udel.edu
Tue Nov 27 11:58:34 EST 2018


On 11/27/2018 8:24 AM, Frank Millman wrote:

> In the line 'return None',  it may be complaining that None is 
> superfluous - a plain 'return' does the same thing.

PEP 8 recommends explicit 'return None' if elsewhere in the function 
there is an explicit 'return something', as in

     if condition:
         return makelist(args)
     else:
         return None

(though in the above, 'return []' might be better).  However, in the 
quoted code, there is no other return (this might be a bug).

-- 
Terry Jan Reedy





More information about the Python-list mailing list