Topic

Generators

Collection size
42 articles
Page 2 of 3
Python Programming Learning Circle
Python Programming Learning Circle
Nov 23, 2024 · Fundamentals

Advanced Python Concepts: Exception Handling, Collections, itertools, Lambdas, Decorators, Generators, Threads, Dunder Methods, Logging, and Context Managers

This article introduces ten advanced Python topics—including exception handling, the collections and itertools modules, lambda functions, decorators, generators, threading, dunder methods, logging, and context managers—providing explanations, code examples, and practical tips to help developers deepen their programming skills and prepare for interviews.

AdvancedCollectionsDecorators
0 likes · 13 min read
Advanced Python Concepts: Exception Handling, Collections, itertools, Lambdas, Decorators, Generators, Threads, Dunder Methods, Logging, and Context Managers
Python Programming Learning Circle
Python Programming Learning Circle
Apr 22, 2024 · Fundamentals

Advanced Python Concepts: Exception Handling, Collections, itertools, Decorators, Generators, and More

This tutorial covers a range of advanced Python topics—including exception handling, the collections module, itertools utilities, lambda functions, decorators, generators, threading, dunder methods, logging, and context managers—to help developers deepen their programming expertise and apply these techniques in real projects.

AdvancedCollectionsDecorators
0 likes · 13 min read
Advanced Python Concepts: Exception Handling, Collections, itertools, Decorators, Generators, and More
Python Programming Learning Circle
Python Programming Learning Circle
Apr 9, 2024 · Fundamentals

How to Avoid Writing For Loops in Python: List Comprehensions, Functions, Generators, and itertools

This article explains why you should avoid writing explicit for loops in Python and demonstrates how to replace them with list comprehensions, map/reduce functions, extracted helper functions, generator expressions, and itertools utilities to produce shorter, more readable, and less indented code.

Functional ProgrammingGeneratorscode optimization
0 likes · 6 min read
How to Avoid Writing For Loops in Python: List Comprehensions, Functions, Generators, and itertools
Python Programming Learning Circle
Python Programming Learning Circle
Dec 21, 2023 · Fundamentals

Advanced Python Concepts: Exception Handling, Collections, itertools, Lambdas, Decorators, Generators, and More

This article presents a comprehensive guide to advanced Python topics—including exception handling, the collections and itertools modules, lambda functions, decorators, generators, process/thread basics, dunder methods, logging, and context managers—providing code examples and explanations to help developers deepen their expertise.

AdvancedCollectionsDecorators
0 likes · 12 min read
Advanced Python Concepts: Exception Handling, Collections, itertools, Lambdas, Decorators, Generators, and More
Python Programming Learning Circle
Python Programming Learning Circle
Apr 19, 2023 · Fundamentals

Hidden Python Tricks: Ternary Operator, enumerate, zip, List Comprehensions, Lambdas, Generators, Decorators and More

This article introduces a collection of lesser‑known Python techniques—including the ternary operator, enumerate, zip, list comprehensions, lambda functions, any/all, itertools, generators, decorators, dynamic imports, dictionary comprehensions, and mutable data structures—each explained with clear examples to help developers write more concise and efficient code.

DecoratorsGeneratorsProgramming tricks
0 likes · 10 min read
Hidden Python Tricks: Ternary Operator, enumerate, zip, List Comprehensions, Lambdas, Generators, Decorators and More
Test Development Learning Exchange
Test Development Learning Exchange
Oct 15, 2024 · Fundamentals

Python Fundamentals: Decorators, List Comprehensions, Generators, Exception Handling, Modules, Threading, Copying, Garbage Collection, *args/**kwargs, Closures, Methods, Process vs Thread, Database Differences, Data Structures, and API Testing

This article provides a comprehensive overview of essential Python concepts—including decorators, list comprehensions, generators, exception handling, modules, threading, shallow and deep copying, garbage collection, variable arguments, closures, method types, process‑thread differences, relational vs NoSQL databases, array vs linked‑list structures, and the distinction between HTTP and Web Service API testing—illustrated with clear explanations and runnable code examples.

DecoratorsFundamentalsGenerators
0 likes · 10 min read
Python Fundamentals: Decorators, List Comprehensions, Generators, Exception Handling, Modules, Threading, Copying, Garbage Collection, *args/**kwargs, Closures, Methods, Process vs Thread, Database Differences, Data Structures, and API Testing
Test Development Learning Exchange
Test Development Learning Exchange
Sep 20, 2024 · Fundamentals

Python yield from: Simplifying Nested Generator Calls and Data Flow

This article explains Python's yield from feature, which simplifies nested generator calls and data flow by delegating sub-generator iteration results to the current generator.

Generatorsdata flowexception handling
0 likes · 5 min read
Python yield from: Simplifying Nested Generator Calls and Data Flow
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
Test Development Learning Exchange
Test Development Learning Exchange
Dec 11, 2023 · Fundamentals

10 Practical Scenarios Demonstrating Lazy Evaluation and Infinite Sequence Handling in Python

This article presents ten practical Python examples illustrating lazy evaluation using generators and iterators, covering infinite sequences, large data processing, file streaming, and on-demand computation, highlighting memory efficiency and performance benefits for handling big data and infinite streams.

GeneratorsInfinite SequencesMemory Efficiency
0 likes · 7 min read
10 Practical Scenarios Demonstrating Lazy Evaluation and Infinite Sequence Handling in Python
Test Development Learning Exchange
Test Development Learning Exchange
Aug 3, 2023 · Fundamentals

10 Practical Scenarios of Lazy Evaluation and Infinite Sequences in Python

This article explains lazy evaluation in functional programming and presents ten Python code examples that demonstrate how generators and iterators can efficiently handle infinite sequences and large‑scale data by computing values only when needed.

GeneratorsInfinite SequencesMemory Efficiency
0 likes · 7 min read
10 Practical Scenarios of Lazy Evaluation and Infinite Sequences in Python
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Sep 28, 2021 · Fundamentals

Understanding JavaScript Generators: Beyond Async/Await and Infinite Sequences

This article clarifies the misconception that JavaScript generators are only for async, explains their underlying pause‑and‑resume mechanism, demonstrates how they can model infinite sequences such as prime numbers by translating Haskell concepts, and shows practical API designs using generators.

Async/AwaitFunctional ProgrammingGenerators
0 likes · 7 min read
Understanding JavaScript Generators: Beyond Async/Await and Infinite Sequences
Laravel Tech Community
Laravel Tech Community
Apr 27, 2020 · Backend Development

Using Laravel FastExcel for Efficient Import and Export of Large Datasets

Laravel FastExcel provides a memory‑friendly alternative to Laravel Excel for importing and exporting data, demonstrating installation via Composer, basic export of collections or models, handling large datasets with generators, and various import configurations, while emphasizing performance considerations such as max_execution_time.

FastExcelGeneratorsImport
0 likes · 5 min read
Using Laravel FastExcel for Efficient Import and Export of Large Datasets
Art of Distributed System Architecture Design
Art of Distributed System Architecture Design
May 16, 2015 · Backend Development

Understanding Modern PHP Features: Namespaces, Traits, Closures, Generators, and New Language Additions

This article introduces the latest PHP language features—including namespaces, traits, closures, generators, and a range of new syntax enhancements—explaining their purpose, usage, and code examples to help developers build modern, maintainable web applications.

Backend DevelopmentGeneratorsNamespaces
0 likes · 17 min read
Understanding Modern PHP Features: Namespaces, Traits, Closures, Generators, and New Language Additions
php中文网 Courses
php中文网 Courses
Dec 1, 2023 · Backend Development

Using PHP Generators to Process Large Data Sets and Prevent Memory Exhaustion

This article explains how PHP developers can use generators to iterate over large data sets without exhausting memory, covering the concept, syntax with the yield keyword, step‑by‑step examples, converting regular functions, handling key‑value pairs, sending data back, returning values, and a real‑world file‑reading use case.

BackendGeneratorslarge-data
0 likes · 5 min read
Using PHP Generators to Process Large Data Sets and Prevent Memory Exhaustion
Python Programming Learning Circle
Python Programming Learning Circle
Jun 5, 2021 · Backend Development

Understanding Python Coroutines: From IO Multiplexing to Generators and Async/Await

This article explains how Python implements coroutines for high‑performance network and web programming by combining OS‑level IO multiplexing, generator‑based control flow, callback elimination, stack‑driven call‑chain traversal, Future objects, and the evolution toward async/await syntax.

Async/AwaitAsyncIOGenerators
0 likes · 18 min read
Understanding Python Coroutines: From IO Multiplexing to Generators and Async/Await
Test Development Learning Exchange
Test Development Learning Exchange
Aug 13, 2018 · Fundamentals

Understanding Python's iter() Function, Iterators, and Generators

This article explains Python's iter() function, its syntax with optional sentinel argument, demonstrates creating iterators from lists and callable objects, and explores the roles of __iter__ and __next__ methods and generator functions through clear code examples.

GeneratorsSentinel__iter__
0 likes · 5 min read
Understanding Python's iter() Function, Iterators, and Generators
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
Python Programming Learning Circle
Python Programming Learning Circle
Mar 5, 2021 · Backend Development

Understanding Python Coroutines: From Generators to Async IO and Event‑Loop Design

This article explains how Python’s coroutine model evolved from Tornado’s single‑threaded async/await support to a generator‑based micro‑framework that uses IO multiplexing, callbacks, futures and stack‑based call‑chain handling to achieve non‑blocking network programming.

AsyncIOGeneratorsIO Multiplexing
0 likes · 21 min read
Understanding Python Coroutines: From Generators to Async IO and Event‑Loop Design
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)
Python Programming Learning Circle
Python Programming Learning Circle
Apr 21, 2020 · Fundamentals

9 Common Python Interview Questions and Answers

This article presents nine frequently asked Python interview questions covering lists, tuples, dictionaries, string reversal, memory management, session/cookie/token concepts, HTTP methods, decorators, concurrency, comprehensions, and generators, each explained with clear descriptions and code examples for developers preparing for technical interviews.

ConcurrencyDecoratorsGenerators
0 likes · 11 min read
9 Common Python Interview Questions and Answers