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

Allow nested FormattingString #66

Closed
wants to merge 3 commits into from
Closed

Allow nested FormattingString #66

wants to merge 3 commits into from

Conversation

jquast
Copy link
Owner

@jquast jquast commented Oct 10, 2015

@jimallman brings us this convenience of allowing existing unicode strings to be joined as a call parameter to a formatting string result, allowing nestation:

>>> t.red('This is ', t.bold('extremely'), ' dangerous!')

This was rejected upstream as erikrose#45 His words,

# creates a red phrase with some bold words in the middle:
t.red('This is ', t.bold('extremely important'), ' information!')

# deeper nesting of styles (green, then bold, then underline, and back out)
t.green('foo', t.bold('bar', t.underline('baz'), 'herp'), 'derp')

@jquast jquast changed the title Push pop idiom Allow nested FormattingString: t.red('text', t.bold('danger', t.underline('xxx'))) Oct 10, 2015
@jquast jquast changed the title Allow nested FormattingString: t.red('text', t.bold('danger', t.underline('xxx'))) Allow nested FormattingString Oct 10, 2015
@jquast
Copy link
Owner Author

jquast commented Oct 10, 2015

Merged by squash for next release

@jquast jquast closed this Oct 10, 2015
@jquast jquast deleted the push-pop-idiom branch October 10, 2015 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants