Python Madlibs.py code and error message

Ben Finney ben+python at benfinney.id.au
Thu Apr 28 02:55:38 EDT 2016


Stephen Hansen <me at ixokai.io> writes:

> On Wed, Apr 27, 2016, at 10:32 PM, Ben Finney wrote:
> > Better: when you have many semantically-different values, use named
> > (not positional) parameters in the format string. […]
> > 
> >     <URL:https://docs.python.org/3/library/string.html#formatstrings>
>
> Except the poster is not using Python 3, so all of this is for naught. 

Everything I described above works fine in Python 2. Any still-supported
version has ‘str.format’.

-- 
 \        “The deepest sin against the human mind is to believe things |
  `\           without evidence.” —Thomas Henry Huxley, _Evolution and |
_o__)                                                    Ethics_, 1893 |
Ben Finney




More information about the Python-list mailing list