Skip to content

The _longest_encoded_length method #510

Answered by rasbt
bvahdat asked this question in Q&A
Discussion options

You must be logged in to vote

Good call. I may have done it the verbose way to make it more readable, but I generally like the more pythonic approach you highlighted. That's imho how it should be done. Unfortunately, I prefer not to change the code because it would otherwise introduce a difference to the book, which could confuse readers. However, I think it's a good idea to add your suggestion via a code comment. Please feel free to open a PR if you have time (otherwise, no worries, I am also happy to do it, just let me know). Thanks for the suggestion in any case!

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@bvahdat
Comment options

@rasbt
Comment options

rasbt Feb 1, 2025
Maintainer

Answer selected by bvahdat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants