Skip to main content
`Ctrl`+`K`

# UnifiedReadWriteMethod

class astropy.io.registry.UnifiedReadWriteMethod(readwritecls, /)

  Bases: `property`

  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)
      write = UnifiedReadWriteMethod(TableWrite)

  Parameters:
    func `UnifiedReadWrite` subclass

      Class that defines read or write functionality