Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

triple quote and %s at beginning of line #558

Closed
bancal opened this Issue · 1 comment

2 participants

@bancal

Using '%s' in the beginning of a line in a triple quote string is replaced by a '_ip.magic("s ")' which is not converted then in string substitution.

The problem :

In [3]: print """
%s
"""

_ip.magic("s ")

In [9]: print """
%s
""" % "fooo"
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/home/bancal/<ipython console> in <module>()

TypeError: not all arguments converted during string formatting

What was expected :

>>> print """
... %s
... """

%s

>>> print """
... %s
... """ % "fooo"

fooo
@takluyver
Owner

Thanks for the bug report. We're actually just days away from releasing IPython 0.11, which doesn't have this problem. So it's not going to get fixed in the 0.10 series.

@takluyver takluyver closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.