Python Forum
difference between next() and .__next__
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
difference between next() and .__next__
#2
In a High-Level-View next(object) calls __next__(object).

The function next is implemented in C and AFAIK different Python-Objects do have different implementations of __next__ in C. But the function next() can also run the Python-Implementation of __next__ of an object.

You should not use __next__ directly.
akbarza likes this post
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Messages In This Thread
RE: difference between next() and .__next__ - by DeaD_EyE - Oct-13-2023, 07:34 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020