Skip to content
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
Closed

triple quote and %s at beginning of line #558

sbancal opened this issue Jul 5, 2011 · 1 comment
Milestone

Comments

@sbancal
Copy link

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
Copy link
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants