astropy/astropy — pull request #3063 by astrofrog (2014-10-29 18:30:46+00:00)
Title: Allow frame instances to be passed to SkyCoord

@eteq @taldcroft - this is related to https://github.com/astropy/astropy/issues/2703

Basically at the moment one cannot pass frame instances to the ``frame=`` keyword argument of ``SkyCoord`` - this is not ideal because sometimes one might get a frame programmatically with all attribute sets, and decomposing it to pass to SkyCoord is a pain. With the following PR, ``frame=`` can be set to a frame instance, if and only if frame arguments are not also passed in the ``SkyCoord`` kwargs (to avoid conflict).

This is backward-compatible and also avoids the issue of having to merge frame attributes passed in the instance vs as keyword arguments.

cc @Cadair