Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion IPython/utils/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,9 @@ def _vformat(self, format_string, args, kwargs, used_args, recursion_depth):
# the formatting

if format_spec:
if conversion:
# override conversion spec
field_name = '!'.join([field_name, conversion])
# override format spec, to allow slicing:
field_name = ':'.join([field_name, format_spec])

Expand Down Expand Up @@ -761,4 +764,4 @@ def get_text_list(list_, last_sep=' and ', sep=", ", wrap_item_with=""):
return list_[0]
return '%s%s%s' % (
sep.join(i for i in list_[:-1]),
last_sep, list_[-1])
last_sep, list_[-1])