New submission from Arfrever Frehtes Taifersar Arahesis 
<arfrever....@gmail.com>:

String interpolation doesn't work with sys.version_info in Python versions in 
which sys.version_info is a named tuple. It's a regression in Python 2.7 and 
3.1. This problem doesn't concern named tuples created using 
collections.namedtuple().

This problem might also concern sys.getwindowsversion(), but I don't have 
access to Windows system, so I can't check it.

$ python2.6 -c 'import sys; print("%s.%s.%s-%s-%s" % sys.version_info)'
2.6.5-final-0
$ python2.7 -c 'import sys; print("%s.%s.%s-%s-%s" % sys.version_info)'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: not enough arguments for format string
$ python3.0 -c 'import sys; print("%s.%s.%s-%s-%s" % sys.version_info)'
3.0.1-final-0
$ python3.1 -c 'import sys; print("%s.%s.%s-%s-%s" % sys.version_info)'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: not enough arguments for format string

----------
components: Library (Lib)
messages: 103282
nosy: Arfrever
severity: normal
status: open
title: String interpolation doesn't work with sys.version_info
versions: Python 2.7, Python 3.1, Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8413>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to