arg(_:)

Parses an argument by name to a Swift value.

Declaration

func arg <T>(
    _ arg: String
) throws -> T where T: Parsable

Parameters

  • arg: The name of the argument.

Throws

A TypeError if the argument name is invalid or a conversion error from from(pythonObject:interpreter:).

Returns

A Swift value.