Skip to content
This repository has been archived by the owner on Apr 24, 2018. It is now read-only.

Why so non intuitive api ? #9

Open
s-y opened this issue Nov 1, 2014 · 2 comments
Open

Why so non intuitive api ? #9

s-y opened this issue Nov 1, 2014 · 2 comments

Comments

@s-y
Copy link

s-y commented Nov 1, 2014

chain = procs.chain()
uptime = chain.process('uptime')
cowsay = chain.process('cowsay')
chain.link(uptime.stdout, cowsay.stdin)
chain.start(wait=True)
chain.wait()

=>

from  procs import chain, process
chain = chain()
chain.link(procces("uptime") > procces("cowsay"))
chain.start(wait=True)

or if I want use only one chain (most cases)

from  procs import chain, process
chain.link(procces("uptime") > procces("cowsay"))
chain.start(wait=True)
@pydanny
Copy link

pydanny commented Nov 12, 2014

Please understand I mean this in the best possible way: What exactly are you trying to say? Maybe I'm stupid but I can't figure out the meaning of your description.

@thebigmunch
Copy link

Your issue seems to have nothing with the API or it being (un)intuitive. It seems your issue is just about making the examples better by making them shorter. But your versions go against some commonly accepted idiomatic conventions. That is why they're written as they are. Of course you're always free to skip convention in your own work as you see fit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants