Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Lazy evaluation in Python

323 views

Published on

http://www.rahulpyd.xyz/lazy-evaluation-in-python.html

Published in: Engineering
  • Be the first to comment

  • Be the first to like this

Lazy evaluation in Python

  1. 1. Lazy evaluation in Python By Rahul Pydimukkala (rahulpyd@gmail.com) BangPypers meetup (18th Feb.,2017)
  2. 2. Lazy evaluation in Python What is lazy evaluation?
  3. 3. Lazy evaluation in Python Delay the evaluation of an expression until its value is needed.
  4. 4. Lazy evaluation in Python Why? - Enables infinite data structures - Control structures as abstractions - Performance benefits – computational and space
  5. 5. Lazy evaluation in Python Why infinite data structures? Lazy sequences
  6. 6. Lazy evaluation in Python Abstracting out control structures
  7. 7. Lazy evaluation in Python Generators
  8. 8. Lazy evaluation in Python Generator expressions (genexps)
  9. 9. Lazy evaluation in Python Iterator protocol Iterator object Iterables

×