Tagged articles
6 articles
Page 1 of 1
Satori Komeiji's Programming Classroom
Satori Komeiji's Programming Classroom
Sep 18, 2024 · Fundamentals

How Python Implements Iterators: From __iter__ to __next__

This article explains Python's iterator protocol by showing how objects become iterable through __iter__, how the built‑in iter function creates iterator objects, the CPython internals of PyObject_GetIter, and how the __next__ method advances elements, with concrete code examples and source‑level snippets.

CPythonIterableIterator
0 likes · 16 min read
How Python Implements Iterators: From __iter__ to __next__
php Courses
php Courses
Aug 3, 2023 · Backend Development

Using PHP's next() Function to Traverse Arrays

This article explains PHP's built‑in next() function, its syntax, how it moves an array's internal pointer, returns element values or false, supports optional circular traversal, provides usage examples, and mentions related pointer functions for effective array handling.

ArrayTraversal__next__
0 likes · 4 min read
Using PHP's next() Function to Traverse Arrays
Laravel Tech Community
Laravel Tech Community
Dec 24, 2020 · Backend Development

PHP next() Function: Advancing the Internal Array Pointer

The PHP next() function moves an array's internal pointer forward by one position, returning the value of the next element or FALSE when no more elements exist, and is demonstrated with sample code showing how to retrieve successive items from an array.

ArrayBackendPHP
0 likes · 2 min read
PHP next() Function: Advancing the Internal Array Pointer