Skip to content

Clean up arithmetic dimensionality #11

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

Closed
wants to merge 1 commit into from
Closed

Clean up arithmetic dimensionality #11

wants to merge 1 commit into from

Conversation

HadrienG2
Copy link
Contributor

Doing arithmetic between ByteSizes and raw integers requires a little bit of care

  • Adding together ByteSizes and raw integers should be disallowed, as it encourages people to work with raw byte counts instead of explicitly stating what they mean.
  • Multiplication of ByteSizes and integers should be commutative.

This was discussed in issue #2, and this MR implements the proposed set of arithmetic operators.

@HadrienG2 HadrienG2 changed the title Clean up arithmetic dimensionality as discussed in #2 Clean up arithmetic dimensionality Sep 26, 2017
@hyunsik
Copy link
Member

hyunsik commented Mar 24, 2018

I'm sorry for a late response. As you suggested, I also cleaned up the arithmetic operators. You can see the improvement at https://github.com/hyunsik/bytesize/releases/tag/release-0.2.0.

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

Successfully merging this pull request may close these issues.

2 participants