Why return None?
peter at engcorp.com
Thu Aug 26 07:37:30 CEST 2004
Martin DeMello wrote:
> It seems to be a fairly common pattern for an object-modifying method to
> return None - however, this is often quite inconvenient.
> this is actually getting in my way a lot when scripting Blender - for
> instance, I can't say move(Vector([a,b,c]).normalize()), I have to do
> a = Vector([a,b,c])
By the way, the second version is much more readable than
the first, so perhaps there is a secondary reason for this
"return None" thing in addition to the more important one...
More information about the Python-list