UnifiedReadWriteMethod¶
- class astropy.io.registry.UnifiedReadWriteMethod(fget=None, fset=None, fdel=None, doc=None)[source]¶
Bases:
propertyDescriptor class for creating read() and write() methods in unified I/O.
The canonical example is in the
Tableclass, where theconnect.pymodule creates subclasses of theUnifiedReadWriteclass. These have custom__call__methods that do the setup work related to calling the registry read() or write() functions. With this, theTableclass defines read and write methods as follows:read = UnifiedReadWriteMethod(TableRead) write = UnifiedReadWriteMethod(TableWrite)
- Parameters:
- func
UnifiedReadWritesubclass Class that defines read or write functionality
- func