Skip to content

Commit 3f4da05

Browse files
Rough out a design doc for .observe() method
1 parent 5691de3 commit 3f4da05

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

TODO.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,31 @@ forget.
1010
Sprint Possibilities
1111
====================
1212

13+
* If a user builds a ``wgs84.latlon()``, and then calls its ``at()`` to
14+
get a position, and then tries to use it to ``observe()``, then they
15+
get::
16+
17+
AttributeError: 'Geocentric' object has no attribute 'observe'
18+
19+
This might be what I’ve been looking for: a refutation of the idea
20+
that position classes should have different methods. My idea had been
21+
that if only the ``Barycentric`` class had ``observe()``, that users
22+
couldn’t call it on the wrong sort of position.
23+
24+
That plan might have worked if users all used IDEs that prevented them
25+
from typing ``.observe()`` on a class with no such method. But even
26+
then, it would offer no help in how to get hold of a class that did
27+
have the method.
28+
29+
But when typing in an editor, nothing stops them from typing
30+
``.observe()``, and the error they get back gives zero information
31+
about how to fix the problem — generating a support load for the
32+
maintainer on GitHub.
33+
34+
We should look at what it would be like for ``.observe()`` to be on
35+
all positions, and raise informative exceptions for positions to which
36+
it doesn’t apply.
37+
1338
* Incorporate historical polar x and y (link shared in #372):
1439
https://datacenter.iers.org/data/latestVersion/186_EOP_C01_2000.1846_NOW_V2013_01186.txt
1540

0 commit comments

Comments
 (0)