A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-November/029837.html below:

[Python-Dev] PEP270 (list.uniq())

[Python-Dev] PEP270 (list.uniq()) [Python-Dev] PEP270 (list.uniq())Padraig Brady padraig.brady@corvil.com
Fri, 01 Nov 2002 17:29:20 +0000
Hi Jason,

I was just reading this and it seems
to overlap with: http://www.python.org/peps/pep-0218.html
I.E. uniq is equivalent to union (with self).

wrt to the uniq command line tool, if you've 2 files a & b, then:

uniq    a b =3D union
uniq -u a b =3D difference
uniq -d a b =3D intersection

So uniq really is a set operation and if Python had
a set builtin type then I'm not sure a uniq method
would be required? Perhaps the list object could
support the union operator so to uniqify a list you
could do:

mylist |=3D mylist

cheers,
P=E1draig.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4