[Python-3000] sets in P3K?

Talin talin at acm.org
Fri Apr 28 01:47:45 CEST 2006


Barry Warsaw <barry <at> python.org> writes:

> Or perhaps an even stupider idea: what if the compiler could recognize
> certain use cases and generate different types depending on how the
> object is used.

Hey! If anyone is going to post stupid ideas to this list, it's gonne be ME! 
Got that?

Speaking of which, while we are on the subject of literals, lets add a "range 
literal". We can use the mathematical notation of square brackets to represent 
inclusion, while parens represent exclusion. So range( 1, 10 ) would be 
written as:

    [1,10)

Or alternatively, the Pascal notation:

     1..10

Also, we should us the greek symbol 'theta' (unicode 03D1) to represent a new 
empty set. For compatibility with existing editors that do not support unicode 
editing, we will allow unicode characters to be inserted into the text using 
the escape sequence \u03d1. So instead of having to write:

    s = set()

You can now write:

    s = \u03d1

:) :) :) :) :) :)

-- Talin




More information about the Python-3000 mailing list