You know, I've grown to like the flexibility of setting optional kwargs to `None` at the interface level then deciding on the a sensible default value later on in the function.  Provided the default value-setting behaviour is well-documented I think it makes future extensions slightly less likely to require less revision of existing code... It's also a commonly adopted and thus instantly recognisable shorthand for "only change me if you need to."


--
Barnaby Rowe
Postdoctoral Research Associate

Department of Physics & Astronomy
University College London
Gower Street
London WC1E 6BT
United Kingdom

On 10 Feb 2014, at 18:22, Mike Jarvis wrote:

> In galsim/wcs.py:
> 
> > +
> > +    The conversion functions are:
> > +
> > +        u = (x-x0) * scale + u0
> > +        v = (y-y0) * scale + v0
> > +
> > +    Initialization
> > +    --------------
> > +    An OffsetWCS is initialized with the command:
> > +
> > +        wcs = galsim.OffsetWCS(scale, origin=None, world_origin=None)
> > +
> > +    @param scale          The pixel scale, typically in units of arcsec/pixel.
> > +    @param origin         Optional origin position for the image coordinate system.
> > +                          If provided, it should be a PostionD or PositionI.
> > +                          [ Default: `origin = None` ]
> 
> Or we can just make that the default. That would probably be simpler. There's not really any good reason to use None here.
> —
> Reply to this email directly or view it on GitHub.
>