Python 的 bytecode 2025年1月2日 Python 喜欢上了通过字节码来分析代码差异的感觉,前几天机缘巧合之下玩了下PHP的opcode,今天来看看Python的bytecode。今天也是巧合,恰好群里有人问Python中3 > 2 == 2为什么结果是True?很多语言其实并没有这种表达式。如果用过JavaScript,就会发现它的结果跟 …... Read more →
Python 的元组疑惑 2023年11月15日 Python 发现一个有点意思的问题,代码如下: t = (['a'], 1, 2) try: t[0] += ['b', 'c'] except Exception as e: print(e) print(t) # output: # …... Read more →