             raise ValueError('nargs for store actions must be > 0; if you '
                              'have nothing to store, actions such as store '
                              'true or store const may be more appropriate')
-        if const is not None and nargs != OPTIONAL:
-            raise ValueError('nargs must be %r to supply const' % OPTIONAL)
+        if const is not None and nargs != $$.OPTIONAL:
+            raise new Error("nargs must be #{$$.OPTIONAL} to supply const")
         super(_StoreAction, self).__init__(
             option_strings=option_strings,
             dest=dest,

            nargs=0,
            help=help)

    def __call__(self, parser, namespace, values, option_string=None):
        parser.print_help()
        parser.exit()


class _VersionAction(Action):

    def __init__(self,
                 option_strings,
                 version=None,
                 dest=SUPPRESS,

            help=help,
            metavar=metavar)

    __call__: (parser, namespace, values, option_string=null) ->
        setattr(namespace, @dest, values)


class _StoreConstAction extends Action

    constructor: (options) ->
                 option_strings,
                 dest,
                 const,
