[Python-ideas] Add new `Symbol` type

Flavio Curella flavio.curella at gmail.com
Thu Jul 5 16:25:18 EDT 2018


> What functionality does such a thing actually need?

I think the requirements should be:
* The resulting symbol behave exactly like None. IE: the symbol should not
be an instance of object, but an instance of its own class
* A symbol can optionally be globally unique.
* Two symbols created by the same key must not be equal. IE: they have
equal key, but different value
   * if we're trying to create global symbols with the same key, an
exception is thrown

This is mostly based on the Javascript spec.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180705/df9a5ae6/attachment-0001.html>


More information about the Python-ideas mailing list