UnifiedReadWriteMethod¶
-
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 theconnect.py
module creates subclasses of theUnifiedReadWrite
class. These have custom__call__
methods that do the setup work related to calling the registry read() or write() functions. With this, theTable
class defines read and write methods as follows:read = UnifiedReadWriteMethod(TableRead) write = UnifiedReadWriteMethod(TableWrite)
- Parameters
- func
UnifiedReadWrite
subclass Class that defines read or write functionality
- func