Feedback requested: https://github.com/petertodd/python-bitcoinlib/pull/289
Adding a function to calculate transaction weight to python-bitcoinlib
rust-bitcoin does something a lot more fancy, with a separate Weight type. But I think this is an appropriate API for python.