Skip to content

Commit

Permalink
removed format since it does not make sense. Changed to force str and…
Browse files Browse the repository at this point in the history
… repr to expand the iterable to produce expected output in python sessions
  • Loading branch information
EntilZha committed Mar 24, 2015
1 parent df8269a commit 19092c8
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions functional/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def __repr__(self):
:return: sequence's repr
"""
self._expand_iterable()
return repr(self.sequence)

def __str__(self):
Expand All @@ -107,6 +108,7 @@ def __str__(self):
:return: sequence's string
"""
self._expand_iterable()
return str(self.sequence)

def __unicode__(self):
Expand All @@ -117,15 +119,6 @@ def __unicode__(self):
"""
return unicode(self.sequence)

def __format__(self, formatstr):
"""
Format the sequence using formatstr and format()
:param formatstr: format passed to format()
:return: formatted string
"""
return format(self.sequence, formatstr)

def __nonzero__(self):
"""
Returns True if size is not zero.
Expand Down

0 comments on commit 19092c8

Please sign in to comment.