On Fri, Apr 28, 2006 at 08:09:24AM -0400, Greg Wilson wrote:
> OK, OK, just so I can get it off my chest:
>
> - introduce '@' as a prefix operator meaning 'freeze'.
>
> - [1, 2, 3] is a mutable sequence (our old friend the list)
>
> - {1, 2, 3} is a mutable set
>
> - @{1, 2, 3} is an immutable set (i.e., a frozen set --- frozen
> at creation, so all current optimizations possible)
>
> - @[1, 2, 3] is an immutable sequence (i.e., a tuple)
>
> Now, if only I can figure out whether "@x" means "bind the name x
> permanently to its current value to create a symbolic constant" or "freeze
> the object to which x currently refers"... ;-)Potentially a stupid question, but I've been following this thread for a while and I'm still not seeing the real gain of extending the syntax for frozen markers/set literals. Someone care to recap what actually is gained from having a set literal? ~harring
pgpsP07ExbNQg.pgp
Description: PGP signature
_______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
