In what python release was this introduced..

Erno Kuusela erno-news at erno.iki.fi
Mon Mar 22 10:11:04 EST 2004


htgk at mail.com (Moe A) writes:

> Hi,
> 
> i need to list dependencies for my package & was wondering in what
> python release could you start making 'in <string>' calls with more
> than one char..eg:
> 
> "JESUS" in bible
> 
> instead of
> 
> "J" in bible

more new and improved sequence/iterators behaviour fun:

Python 2.3.3 (#2, Jan 13 2004, 00:47:05)
[GCC 3.3.3 20040110 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 'x'.join({'foo': 'bar'})
'foo'

i actually ran into this when i was staring at code written
by a coworker and wondered how on earth it ever worked...
(it didn't, since it really meant to use a list and wanted
order to be preserved, but it misbehaved silently instead of
raising an exception).

  -- erno



More information about the Python-list mailing list