Skip to content

Add example of combining value conversion with format specifiers #37

@arthur-tacca

Description

@arthur-tacca

It's not clear from the page at the moment how to combine value conversion (e.g. "{!s}".format(foo)) with format specifiers (e.g. resulting in "{!s:.5}".format(foo)). After trying a few combinations (like "{:!s.5}".format(foo)) I caved in and looked at the official documentation (horrors!). It would be nice if the value conversion section included an example with a format specifier. It wouldn't matter which format specifier because that would be enough to demonstrate the general syntax. Something common like padding would be good.

Sorry I haven't included a pull request with this request. 😢

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions