Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions returning multiple values should probably be returning objects #19

Open
ghost opened this issue Oct 22, 2013 · 0 comments
Open

Comments

@ghost
Copy link

ghost commented Oct 22, 2013

Looking at arbitrer.py, it seems there is still some encapsulation and abstraction to be done. I don't personally like it when a function returns more than one value, and here we have functions returning as many as six values. It's very easy to mix up return values, and it's very hard to update anything that uses those functions if those functions change.

I propose we create a class to encapsulate those values, and perhaps move some of Arbitrer's functionality into that class. This could also facilitate using other currencies as "pivot" currencies, or at the very least aid in finding arbitrage chains that include links without USD as one of the currencies involved. (I.e., inter-crypto arbitrage.)

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

No branches or pull requests

0 participants