Advertisement
Guest User

Untitled

a guest
May 26th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. # This:
  2. values = [getattr(obj, attr) for attr in attributes if not attr.beginswith('_')]
  3.  
  4. # Vs. this:
  5. values = [
  6.     getattr(obj, attr)
  7.     for attr in attributes
  8.     if not attr.beginswith('_')
  9. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement