Menu

#71 Implement `0b` for integers

0.6.5
open
nobody
None
2015-06-02
2015-06-02
No

Sometimes you just want to get an integer in a range of bases, and having to remove 0 from the range to avoid an error is often annoying, or sometimes it's shorter to remove unwanted bases after the conversion. Could 0b on integers be implemented somehow?

One option is to just wrap the given integer in an array:

5 0b  -->  [5]

This would ensure that a roundtrip 0b conversion would yield the same integer again.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.