使用范例
import pysnooper
@pysnooper.snoop()def number_to_bits(number): if number: bits = [] while number: number, remainder = divmod(number, 2) bits.insert(0, remainder) return bits else: return [0]
number_to_bits(6)
输出范例
Starting var:.. number = 621:14:32.099769 call 3 @pysnooper.sn
网友评论