@staticmethod
    def argv(argv=sys.argv[1:]):
        from docopt import docopt
        from itertools import count
        args = docopt(__doc__, argv)
        method = [meth for meth in ('push', 'req', 'rep', 'pub', 'pull', 'sub')
                  if args[meth]]
        if not method:
            raise UnsupportedZmqMethod('Unsupported ZMQ method', '?', args)
        method = method[0]

        setup = ZeroSetup(method, args['<socket>']).debugging(args['--dbg'])
        if args['--bind']:
            setup.binding(True)
        if args['--connect']:
            setup.binding(False)
        if args['<subscription>']:
            setup.subscribing(args['<subscription>'])
        setup.args = args
        setup.debug('%r', setup)

        msgloop = None
        if setup.transmits:
            if args['-']:
                msgloop = ZeroSetup.iter_stdin()
            else:
                msgloop = args['<message>']
        elif args['-n'] == 'inf':
            msgloop = count()
        else:
            msgloop = xrange(int(args['-n']))
        return setup, msgloop
RenameField should optimize to the other side of AlterField,
dataset/ETHPy150Open philipbergen/zero/py/zero/__init__.py/ZeroSetup.argv--crossover with--dataset/ETHPy150Open django/django/tests/migrations/test_optimizer.py/OptimizerTests.test_alter_field_rename_field