Skip to content

Is there a way to represent an empty tuple type? #4211

Closed

Description

@leandropls

logging.handlers.SMTPHandler arg secure accepts something like this:

Union[EmptyTuple, Tuple[str], Tuple[str, str]]

Is there a way to define the EmptyTuple part?

Activity

  1. elazarg commented on Nov 6, 2017

    @elazarg
    Contributor

    Should be Tuple[()]

  2. leandropls commented on Nov 6, 2017

    @leandropls
    Author

    @elazarg thanks!

  3. emmatyping commented on Nov 6, 2017

    @emmatyping
    Member

    I did not find any documentation of this, so it would be nice to add that.

  4. gvanrossum commented on Nov 7, 2017

    @gvanrossum
    Member
  5. added a commit that references this issue on Dec 4, 2017
    71332d5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions