简体   繁体   中英

What does next build-in function mean in python3?

So what does next keyword mean in python 3? I am using 3.4.0 and sublime 3 text editor and when I write next in it it turns blue? I tried to search about it but I haven't seem to find anything more specific.

next is not a keyword but a built-in function .

The Python documentation also includes a list of keywords ; you'll see it is not listed there.

In Python 2, iterators defined an iterator.next() method , but that has been renamed to iterator.__next__() in Python 3. It is probably that method name the syntax highlighter tries to color-code; the Python 3 package for Sublime Text adds __next__ as highlighted too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM