Tag

yield

0 views collected around this technical thread.

Test Development Learning Exchange
Test Development Learning Exchange
Sep 18, 2024 · Fundamentals

Understanding Python Generators: Functions, Expressions, and Internal Implementation

This article explains Python generators, covering generator functions and expressions, their usage with yield, the send method, and the underlying CPython state‑machine implementation, illustrated with clear code examples; it also discusses how generators manage execution flow and improve memory efficiency.

GeneratorsIteratoryield
0 likes · 6 min read
Understanding Python Generators: Functions, Expressions, and Internal Implementation
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.

PHPasynchronousgenerator
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.

Memory OptimizationPHPbackend-development
0 likes · 7 min read
Using the PHP yield Keyword for Memory‑Efficient Data Processing
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.

AsyncData ProcessingJavaScript
0 likes · 11 min read
Understanding JavaScript Generators: Basics, Syntax, and Advanced Usage
Python Programming Learning Circle
Python Programming Learning Circle
Nov 27, 2021 · Fundamentals

Understanding Python Generators and Generator Expressions

This article introduces Python generators, explains how the yield statement creates generator functions, demonstrates usage with example code, compares yield to return, and shows how generator expressions provide memory-efficient iteration similar to list comprehensions.

Generator ExpressionsGeneratorsiteration
0 likes · 4 min read
Understanding Python Generators and Generator Expressions
High Availability Architecture
High Availability Architecture
Dec 27, 2020 · Fundamentals

Understanding Coroutines: From Ordinary Functions to User‑Level Threads

This article explains the concept of coroutines, compares them with ordinary functions, shows Python code examples of yielding and resuming execution, illustrates their historical background, and describes how they are implemented using heap‑allocated stack frames to achieve lightweight, user‑level concurrency.

ConcurrencyProgramming Fundamentalscoroutine
0 likes · 13 min read
Understanding Coroutines: From Ordinary Functions to User‑Level Threads
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.

IteratorPHPbackend
0 likes · 6 min read
Understanding PHP Generators and the yield Keyword
Python Programming Learning Circle
Python Programming Learning Circle
May 14, 2020 · Fundamentals

Understanding Python Generators, Yield/Yield from, and Coroutines (asyncio)

This article explains Python's Global Interpreter Lock, introduces generators and the yield/yield from expressions, demonstrates how they enable coroutine-based asynchronous programming, and provides practical asyncio examples using @asyncio.coroutine, async/await, and futures for efficient I/O handling.

Async/AwaitAsyncIOGenerators
0 likes · 13 min read
Understanding Python Generators, Yield/Yield from, and Coroutines (asyncio)
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 Optimizationgenerator
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.

Async/AwaitAsyncIOAsynchronous Programming
0 likes · 10 min read
Master Python Coroutines: From Generators to async/await
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.

ES6IteratorJavaScript
0 likes · 13 min read
Master JavaScript Generators: Control Iteration and Boost Your Code
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
May 2, 2017 · Frontend Development

Mastering ES6 Yield: How Generators Pause and Resume Execution

This article explains the ES6 yield keyword, its role in generator functions, how the .next() method controls execution flow, how parameters affect yielded values, and provides practical examples to help JavaScript developers master asynchronous iteration.

ES6JavaScriptfrontend
0 likes · 10 min read
Mastering ES6 Yield: How Generators Pause and Resume Execution
Qunar Tech Salon
Qunar Tech Salon
Feb 14, 2015 · Fundamentals

Understanding the Differences Between Java's yield() and join() Methods

This article explains Java thread scheduling, priority, and the distinct behaviors of the yield() and join() methods, providing code examples that illustrate how each method influences thread execution order and synchronization in multithreaded applications.

ConcurrencyJavaJoin
0 likes · 9 min read
Understanding the Differences Between Java's yield() and join() Methods