【问题标题】:What does next build-in function mean in python3?python3中的下一个内置函数是什么意思?
【发布时间】:2014-10-19 09:43:48
【问题描述】:

那么next 关键字在 python 3 中是什么意思呢?我正在使用 3.4.0 和 sublime 3 文本编辑器,当我在其中写 next 时它变成蓝色?我试图搜索它,但似乎没有找到更具体的内容。

【问题讨论】:

    标签: python python-3.x keyword sublimetext3


    【解决方案1】:

    next 不是关键字,而是built-in function

    Python 文档还包括一个list of keywords;你会看到它没有列在那里。

    在 Python 2 中,迭代器定义了一个 iterator.next() method,但在 Python 3 中已将其重命名为 iterator.__next__()。语法高亮器尝试对方法名称进行颜色编码; Python 3 package for Sublime Text 添加 __next__ 也突出显示。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-01-19
      • 2016-03-08
      • 1970-01-01
      • 2012-07-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多