Skip to content

Commit

Permalink
implemented generators throughout entire library. Need to inspect mor…
Browse files Browse the repository at this point in the history
…e carefully for missing opportunities to use generators as well as test to insure that everywhere a generator is expected it is returned. Additionally that everywhere a generator is expected to be evaluated and its result stored, that is happening
  • Loading branch information
EntilZha committed Mar 24, 2015
1 parent 6625efa commit df8269a
Show file tree
Hide file tree
Showing 2 changed files with 218 additions and 180 deletions.

1 comment on commit df8269a

@adrian17
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another note: in flatten(), return chain.from_iterable(self.sequence) is a bit faster:

Top one is self.flat_map(lambda x: x), bottom is chain.from_iterable(self.sequence)

edit: oh wait, it doesn't pass tests for some reason itertools.chain generator is not properly expanded, I guess

Please sign in to comment.