Skip to content

Split Result off into a standalone library? #477

Closed

Description

@njsmith

Result and its subclasses are a self-contained reusable abstraction. Which has made it awkward to figure out where to put them: in trio feels weird b/c they're not needed at all for using trio's main APIs, but trio.hazmat also feels weird because there's absolutely nothing hazardous about them, and in fact they are sometimes useful in ordinary code that's not using anything else in hazmat. (I guess this is related to #476.)

The most natural solution is perhaps to split them off into their own library that trio would depend on. Unfortunately result is taken on PyPI, though I guess results is free. Or I guess outcome is free.

Activity

  1. RazerM commented on Mar 20, 2018

    @RazerM
    Member

    Were you thinking outcome.Outcome? I'm not sure if results.Result is better 🤔

  2. njsmith commented on Mar 21, 2018

    @njsmith
    MemberAuthor

    Eh, I haven't thought about it too much :-). Either seems workable, really, or there are probably other options too that I didn't think of. I don't think it's worth stressing about too much; we'll quickly get used to whatever we pick.

  3. Fuyukai commented on Apr 13, 2018

    @Fuyukai
    Member

    Since this actually happened, should this issue be closed?

  4. njsmith commented on Apr 13, 2018

    @njsmith
    MemberAuthor

    I guess this issue now should track the changes needed on trio's side to switch to using the new library?

  5. Fuyukai commented on Apr 14, 2018

    @Fuyukai
    Member

    I'll close this one and open a separate issue for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions