[Python-Dev] [Python-checkins] peps: PEP 426: replace implied 'version starts with' with new ~= operator
ezio.melotti at gmail.com
Sat Feb 23 05:24:04 CET 2013
On Sat, Feb 23, 2013 at 5:33 AM, daniel.holth
<python-checkins at python.org> wrote:
> changeset: 4764:de69fe61f300
> user: Daniel Holth <dholth at fastmail.fm>
> date: Fri Feb 22 22:33:09 2013 -0500
> PEP 426: replace implied 'version starts with' with new ~= operator
I haven't seen any discussion about this, but FWIW CSS  and JQuery
 use ^= for this purpose.
^ also indicates the beginning of the string in regular expressions
(this is why ^= was chosen for CSS/JQuery).
They also use ~= to indicate "attribute contains word" .
Perl also has a similar-looking operator  (=~) used to test a regex match.
More information about the Python-Dev