V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
WinG
V2EX  ›  Python

Python 字节序调试 查看内存地址的问题。

  •  
  •   WinG · 2017-05-28 07:08:09 +08:00 · 1683 次点击
    这是一个创建于 2540 天前的主题,其中的信息可能已经有所发展或是发生改变。
    最近调试一个 hash 函数,达不到想要的输出。

    感觉可能是字节序的问题。

    已知查某个变量的地址用 id()

    请问 python 怎么可以查看内存地址的内容?

    望高手指导。
    3 条回复    2017-05-28 13:24:29 +08:00
    XYxe
        1
    XYxe  
       2017-05-28 10:20:17 +08:00 via Android   ❤️ 1
    struct 模块?
    ivechan
        2
    ivechan  
       2017-05-28 11:55:24 +08:00   ❤️ 1
    memoryview ?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3019 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 00:32 · PVG 08:32 · LAX 17:32 · JFK 20:32
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.