zero argument member functions versus properties
Peter Cacioppi
peter.cacioppi at gmail.com
Sun Nov 3 01:11:17 EST 2013
I just said
"1-> the zero argument function is sort of factory-like. It potentially has non-trivial run time, or it substitutes calling a class constructor when building certain objects.
2-> it simply retrieves a stored value (perhaps lazily evaluating it first)
so 1 should clearly be a zero argument member function. 2 should be a method. "
typo. Obviously, 2 should be a property.
More information about the Python-list
mailing list