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
ljcarsenal
V2EX  ›  Python

有没有遇到过 sublime text 缩进的问题?

  •  
  •   ljcarsenal · 2014-12-13 17:33:25 +08:00 · 2810 次点击
    这是一个创建于 3449 天前的主题,其中的信息可能已经有所发展或是发生改变。
    就是在sublime下看是正常的,但是运行就提示 unindent does not match any outer indentation level。和 idle打开 看到的不一样
    3 条回复    2014-12-13 21:12:09 +08:00
    ZzFoo
        1
    ZzFoo  
       2014-12-13 18:28:04 +08:00
    把代码选中,缩进不是点点“····”而是横杠“——”的那一行就是出错的地方,改成空格就行了

    以后你可以设置View->Indentation->Indent Using Spaces,这样应该不会再出错了
    imn1
        2
    imn1  
       2014-12-13 18:46:13 +08:00
    如果装了lint一般都会报的吧?
    ljcarsenal
        3
    ljcarsenal  
    OP
       2014-12-13 21:12:09 +08:00
    @ZzFoo 我在pycharm里打开看了一下,提示说是 空格和tab混用了。。。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2926 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 12:05 · PVG 20:05 · LAX 05:05 · JFK 08:05
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.