original_docstring: Create a new policy from the input source parsing it using a
          reader from the required reader factory e.g. ETreeReaderFactory to use
          ElementTree based parsing
  
          @param source: source from which to read the policy - file path,
          file object, XML node or other dependent on the reader factory selected
          @type source: string, file, XML node type
          @param readerFactory: factory class returns reader class used to parse
          the policy
          @type readerFactory: ndg.xacml.parsers.AbstractReaderFactory
          @return: new policy instance
          @rtype: ndg.xacml.core.policy.Policy
          
docstring: Create a new policy from the input source parsing it using a
  reader from the required reader factory e.g.
docstring_tokens: Create a new policy from the input source parsing it using a reader from the required reader factory e . g .
code: def fromSource(cls, source, readerFactory):
          """Create a new policy from the input source parsing it using a
          reader from the required reader factory e.g. ETreeReaderFactory to use
          ElementTree based parsing
  
          @param source: source from which to read the policy - file path,
          file object, XML node or other dependent on the reader factory selected
          @type source: string, file, XML node type
          @param readerFactory: factory class returns reader class used to parse
          the policy
          @type readerFactory: ndg.xacml.parsers.AbstractReaderFactory
          @return: new policy instance
          @rtype: ndg.xacml.core.policy.Policy
          """
          if not issubclass(readerFactory, AbstractReaderFactory):
              raise TypeError('Expecting %r derived class for reader factory '
                              'method; got %r' % (AbstractReaderFactory,
                                                  readerFactory))
  
          reader = readerFactory.getReader(cls)
          if not issubclass(reader, AbstractReader):
              raise TypeError('Expecting %r derived class for reader class; '
                              'got %r' % (AbstractReader, reader))
  
          return reader.parse(source)
code_tokens: def fromSource ( cls , source , readerFactory ) : if not issubclass ( readerFactory , AbstractReaderFactory ) : raise TypeError ( 'Expecting %r derived class for reader factory ' 'method; got %r' % ( AbstractReaderFactory , readerFactory ) ) reader = readerFactory . getReader ( cls ) if not issubclass ( reader , AbstractReader ) : raise TypeError ( 'Expecting %r derived class for reader class; ' 'got %r' % ( AbstractReader , reader ) ) return reader . parse ( source )
short_docstring: Create a new policy from the input source parsing it using a
  reader from the required reader factory e.g.
short_docstring_tokens: Create a new policy from the input source parsing it using a reader from the required reader factory e . g .
comment: """Create a new policy from the input source parsing it using a
          reader from the required reader factory e.g. ETreeReaderFactory to use
          ElementTree based parsing
  
          @param source: source from which to read the policy - file path,
          file object, XML node or other dependent on the reader factory selected
          @type source: string, file, XML node type
          @param readerFactory: factory class returns reader class used to parse
          the policy
          @type readerFactory: ndg.xacml.parsers.AbstractReaderFactory
          @return: new policy instance
          @rtype: ndg.xacml.core.policy.Policy
          """