Skip to content
This repository was archived by the owner on Apr 20, 2025. It is now read-only.

Conversation

@adamantike
Copy link
Contributor

Binary representation through format string syntax. It also checks earlier if parameter is an integer, so it fails for num = 0.0 instead of returning 0 (current behaviour).

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 90.877% when pulling f1aedea on adamantike:simplified-bit-size into a548782 on sybrenstuvel:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 91.111% when pulling a8a8f94 on adamantike:simplified-bit-size into a548782 on sybrenstuvel:master.

@sybrenstuvel
Copy link
Owner

This is a good target for refactoring indeed. Now that we no longer have to support Python 2.6, we can simply use int.bit_length() instead. I implemented this in 5e08c91.

@adamantike adamantike deleted the simplified-bit-size branch March 29, 2016 18:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants