Thanks to all for your replies
All things considered, I vote for evaluating the arguments at runtime
(each time the function is called). Good reasons for this have already
been mentioned so I won't repeat them. A programming language is a
user interface of sorts. (Pretty much all languages are log
Hello All,
Why is python designed so that b and c (according to code below)
actually share the same list object? It seems more natural to me that
each object would be created with a new list object in the points
variable.
class Blob:
def __init__(self, points=[]):
self._points = point
Hello All,
Case 1
This generates an error, which makes sense because the argument should
be a list of numbers:
numpy.array(10,10)
Case 2
This does not generate an error and the result is an array with a
single element:
a = numpy.array([10])
b = numpy.array([10])
numpy.array(a[0],b[0])
The only d