Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はPythonの初心者であり、ELM327のDonour SizemoreによるpyOBDと呼ばれるオープンソースプロジェクトを進めています(よくわかりませんが、より多くのscantoolデバイスを対象とする可能性があります).次は16進値を変換する方法であることがわかりますint.しかし、どのように機能しますか? 特にその中にある行eval。
eval
def hex_to_int(str): i = eval("0x" + str, {}, {}) return i