mirror of
https://github.com/python/cpython.git
synced 2025-07-30 14:44:10 +00:00
Added '#' formatting to integers. This adds the 0b, 0o, or 0x prefix for bin, oct, hex. There's still one failing case, and I need to finish the docs. I hope to finish those today.
This commit is contained in:
parent
a6864e0d9f
commit
d0c841243c
3 changed files with 88 additions and 13 deletions
|
@ -192,6 +192,10 @@ class ModuleTest(unittest.TestCase):
|
|||
self.assertRaises(ValueError, fmt.format, "{0}", 10, 20, i=100)
|
||||
self.assertRaises(ValueError, fmt.format, "{i}", 10, 20, i=100)
|
||||
|
||||
# Alternate formatting is not supported
|
||||
self.assertRaises(ValueError, format, '', '#')
|
||||
self.assertRaises(ValueError, format, '', '#20')
|
||||
|
||||
class BytesAliasTest(unittest.TestCase):
|
||||
|
||||
def test_builtin(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue