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

update EvalFormatter to allow arbitrary expressions #716

Merged
merged 1 commit into from Aug 21, 2011

Conversation

minrk
Copy link
Member

@minrk minrk commented Aug 21, 2011

EvalFormatter should now support arbitrary Python expressions, including slicing. Since slicing conflicts with the format_spec part of fancy formatting, there is a switch to restore format_spec behavior at the expense of slicing. If we don't want to support slicing with colons, then there is a simpler implementation overriding only Formatter.get_field().

Associated tests also added.

EvalFormatter should now support arbitrary Python expressions, including
slicing.  Since slicing conflicts with the format_spec part of fancy formatting, there is a switch to restore format_spec behavior at the expense of slicing.

Associated tests added as well.
@fperez fperez merged commit 8f55395 into ipython:master Aug 21, 2011
@fperez
Copy link
Member

fperez commented Aug 21, 2011

Looks perfect, merged. Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants