class astropy.io.registry.UnifiedReadWriteMethod(func)[source]

Bases: object

Descriptor class for creating read() and write() methods in unified I/O.

The canonical example is in the Table class, where the connect.py module creates subclasses of the UnifiedReadWrite class. These have custom __call__ methods that do the setup work related to calling the registry read() or write() functions. With this, the Table class defines read and write methods as follows:

read = UnifiedReadWriteMethod(TableRead)

funcUnifiedReadWrite subclass