| 1 | initial version |
Only the Python object None has type NoneType.
Usually a return value of None means the function did not return anything.
This frequently happens when one defines a function which does a computation but forgets to return the result, as in:
def list_cartesian_product(F, n):
K = list(cartesian_product([F]*n))
instead of
def list_cartesian_product(F, n):
K = list(cartesian_product([F]*n))
return K
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.