Tagged articles
27 articles
Page 1 of 1
MaGe Linux Operations
MaGe Linux Operations
Jan 11, 2025 · Fundamentals

Master Python Iterators and Generators: From Basics to Advanced Usage

This article explains Python iterators, iterables, and generators, detailing their definitions, core methods, advantages, disadvantages, and practical code examples—including iterator objects, generator creation via comprehensions and the yield keyword, decorator integration, and mutable data handling—providing a comprehensive guide for developers.

DecoratorIterableIterator
0 likes · 14 min read
Master Python Iterators and Generators: From Basics to Advanced Usage
Satori Komeiji's Programming Classroom
Satori Komeiji's Programming Classroom
Dec 2, 2024 · Fundamentals

Master Python Generators (And the Odd Feud Behind It)

This article walks through Python generators in depth—covering basic yield behavior, the __next__, send, throw, and close methods, pre‑activation states, delegation with yield from, generator expressions pitfalls, and their role in coroutine implementation—while briefly recounting a personal conflict that sparked the write‑up.

CoroutinesGeneratorsPython
0 likes · 28 min read
Master Python Generators (And the Odd Feud Behind It)
php Courses
php Courses
Nov 1, 2023 · Backend Development

Understanding PHP Generator Functions: Syntax, Use Cases, and Examples

This article explains PHP generator functions, covering their purpose for memory‑efficient data iteration, streaming, and asynchronous tasks, detailing their syntax with the yield statement, providing multiple code examples, outlining advantages, usage notes, and concluding with best‑practice recommendations.

AsynchronousYielditeration
0 likes · 5 min read
Understanding PHP Generator Functions: Syntax, Use Cases, and Examples
php Courses
php Courses
Oct 30, 2023 · Backend Development

Using the PHP yield Keyword for Memory‑Efficient Data Processing

This article explains how the PHP yield keyword creates generators that allow lazy iteration over large data sets, large files, or infinite sequences, reducing memory consumption and improving performance by pausing and resuming function execution without returning the entire collection at once.

PHPYield
0 likes · 7 min read
Using the PHP yield Keyword for Memory‑Efficient Data Processing
Liangxu Linux
Liangxu Linux
Sep 29, 2023 · Fundamentals

Why Coroutines Matter: A Beginner’s Guide to Pausable Functions

This article explains what coroutines are, how they differ from ordinary functions by supporting multiple pause points, demonstrates their behavior with Python code and visual diagrams, covers their historical origins, and details low‑level implementation using stack frames and heap allocation for efficient user‑level concurrency.

PythonYieldasynchronous programming
0 likes · 13 min read
Why Coroutines Matter: A Beginner’s Guide to Pausable Functions
Sohu Tech Products
Sohu Tech Products
Apr 26, 2023 · Fundamentals

Understanding JavaScript Generators: Basics, Syntax, and Advanced Usage

JavaScript Generators, introduced in ES6, allow functions to pause and resume execution, yielding multiple values; this article explains their syntax, basic usage, advanced features like yield* and data exchange, and demonstrates practical scenarios such as asynchronous flow control, memory-efficient data processing, and state machine implementation.

AsyncJavaScriptYield
0 likes · 11 min read
Understanding JavaScript Generators: Basics, Syntax, and Advanced Usage
Programmer DD
Programmer DD
Dec 13, 2021 · Backend Development

Why Java 14’s New Switch Expression and Null‑Pointer Messages Matter

This article explains Java 14’s revamped switch expression syntax—including the concise case‑label arrow, the new yield keyword for returning values, and improved NullPointerException messages—showing how these changes simplify code and make debugging clearer.

Java 14Yieldjava
0 likes · 6 min read
Why Java 14’s New Switch Expression and Null‑Pointer Messages Matter
php Courses
php Courses
Dec 9, 2020 · Backend Development

Understanding PHP Generators and the yield Keyword

This article explains PHP's Generator feature introduced in version 5.5, demonstrating how the yield keyword enables memory‑efficient iteration, how to implement custom xrange functions, and how to control generators with methods like next, current, valid, send, rewind, and throw.

IteratorYieldgenerator
0 likes · 6 min read
Understanding PHP Generators and the yield Keyword
Test Development Learning Exchange
Test Development Learning Exchange
Dec 9, 2019 · Fundamentals

Understanding Python's yield Keyword and Generators

This article explains the purpose and behavior of Python's yield keyword, how generators work, their difference from regular functions, and demonstrates practical examples including iterator concepts, itertools utilities, and memory‑efficient looping techniques.

IteratorMemory OptimizationPython
0 likes · 10 min read
Understanding Python's yield Keyword and Generators
Python Programming Learning Circle
Python Programming Learning Circle
Sep 9, 2019 · Fundamentals

Master Python Coroutines: From Generators to async/await

This article walks through the evolution of Python's coroutine support—from early generator‑based yield/send patterns, through the introduction of @asyncio.coroutine and yield from, to the modern async and await syntax—explaining concepts, execution flow, and providing clear code examples.

PythonYieldasync/await
0 likes · 10 min read
Master Python Coroutines: From Generators to async/await
MaGe Linux Operations
MaGe Linux Operations
Oct 31, 2018 · Fundamentals

Mastering Python Coroutines: From Basics to Real-World File Search

This article explains the concept of coroutines, compares them with threads, lists their pros and cons, demonstrates how Python's yield can implement coroutine behavior with code examples, and then applies a procedural programming approach to build a simple file‑search utility that mimics grep -rl error.

Yieldprocedural programming
0 likes · 7 min read
Mastering Python Coroutines: From Basics to Real-World File Search
Yuewen Frontend Team
Yuewen Frontend Team
Sep 28, 2018 · Frontend Development

Master JavaScript Generators: Control Iteration and Boost Your Code

This article explains ES6 JavaScript generators, covering their syntax, how they differ from regular iterators, the role of the yield keyword, available generator methods, and practical examples such as custom generators, random number streams, throttling, Fibonacci sequences, and integrating generators with HTML to simplify iterative tasks.

AsynchronousIteratorJavaScript
0 likes · 13 min read
Master JavaScript Generators: Control Iteration and Boost Your Code
MaGe Linux Operations
MaGe Linux Operations
Oct 26, 2017 · Fundamentals

Unlocking Python Generators: How They Work Under the Hood

This article explains the inner mechanics of Python generators, covering how the interpreter executes functions, the role of stack frames and bytecode, the generator flag, and how send, yield, and StopIteration interact, illustrated with detailed code examples and disassembly.

GeneratorsPythonStopIteration
0 likes · 8 min read
Unlocking Python Generators: How They Work Under the Hood
Node Underground
Node Underground
Nov 19, 2015 · Backend Development

Mastering yield* in Koa: How Generators and co Simplify Async Flow

This article demystifies the use of yield* in Koa middleware by comparing plain yield with delegating yield, explaining how the co library handles generators and promises, and outlining the practical advantages of native yield* syntax for clarity, performance, and correct this binding.

AsyncGeneratorsJavaScript
0 likes · 9 min read
Mastering yield* in Koa: How Generators and co Simplify Async Flow