[Python-ideas] get method for sets?

Yury Selivanov yselivanov.ml at gmail.com
Wed May 16 22:10:00 CEST 2012


On 2012-05-16, at 10:51 AM, Masklinn wrote:
> With the difference that ,= also asserts there is only one item in the
> iterable, where `next . iter` only does `head`.

For that, the ,*_= operator exists ;)

>>> a = '123'
>>> b ,*_= a
>>> b
'1'

I hope I'll never encounter this, though.

-
Yury



More information about the Python-ideas mailing list