A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-October/092809.html below:

[Python-Dev] transitioning from % to {} formatting

[Python-Dev] transitioning from % to {} formatting [Python-Dev] transitioning from % to {} formattingVinay Sajip vinay_sajip at yahoo.co.uk
Thu Oct 8 18:51:53 CEST 2009
Benjamin Peterson <benjamin <at> python.org> writes:

> It's also really easy to just write 0{:o} like my translator does.

How does that cope when handed a negative number to format?

>>> "%#0o" % -1234
'-02322'
>>> "0{0:o}".format(-1234)
'0-2322'

Regards,

Vinay Sajip



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4