doc: revisions to factory.py