I want to define a resize(h, w) method, and I want to be able to call it in one of two ways:
resize(x,y)resize(x)
Where, in the second call, I want y to be equal to x. Can I do this in the method definition or should I do something like resize(x,y=None) and check inside:
if y is None:
y = x
Nonecode is the preferred way.