(self, chain)
return Chain(self, chain)
Create a new chain *chain*.
Create a new chain *chain*.
Create a new chain * chain * .
def create_chain(self, chain):
        """Create a new chain *chain*."""
        if isinstance(chain, Chain):
            chain = chain.name
        rv = self._iptc.iptc_create_chain(chain.encode(), self._handle)
        if rv != 1:
            raise IPTCError("can't create chain %s: %s" % (chain,
                                                           self.strerror()))
        return Chain(self, chain)
def create_chain ( self , chain ) : if isinstance ( chain , Chain ) : chain = chain . name rv = self . _iptc . iptc_create_chain ( chain . encode ( ) , self . _handle ) if rv != 1 : raise IPTCError ( "can't create chain %s: %s" % ( chain , self . strerror ( ) ) ) return Chain ( self , chain )