Boo

String interpolation formatting

Details

  • Type: New Feature New Feature
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 0.8.1
  • Fix Version/s: 0.9
  • Component/s: None
  • Labels:
    None
  • Testcase included:
    yes
  • Number of attachments :
    0

Description

Currently we can do this :

n = 42
print "hex(x) = {0:x4}" % (n,)

or this :

n = 42
print "hex(n) = ${n.ToString('x4')}"

It would be nice to be able to do this :

n = 42
print "hex(n) = ${n:x4}"

Activity

Hide
Cedric Vivier added a comment -

Landed in rev. 3073

Show
Cedric Vivier added a comment - Landed in rev. 3073

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: