New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

triple quote and %s at beginning of line #558

Closed
sbancal opened this Issue Jul 5, 2011 · 1 comment

Comments

Projects
None yet
2 participants
@sbancal

sbancal commented Jul 5, 2011

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

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver Jul 5, 2011

Member

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.

Member

takluyver commented Jul 5, 2011

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 Jul 5, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment