This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Installing SymbolType (using "easy_install SymbolType" or " install") gives you access to the peak.util.symbols module, previously available only by installing the full PEAK toolkit. peak.util.symbols provides a Symbol type and two built-in symbols that are used by PEAK: NOT_FOUND and NOT_GIVEN. You can create your own symbol objects using the Symbol type, by giving it the symbol name and the name of the module where the symbol is being created:

>>> from peak.util.symbols import Symbol
>>> AN_EXAMPLE = Symbol('AN_EXAMPLE', __name__)

The resulting object’s repr() and str() forms are the same as the name you passed in:


>>> str(AN_EXAMPLE)

But symbols compare equal only to themselves; they are not equal to strings:



A symbol’s __name__ and __module__ attributes are the original name and module used to create the symbol:

>>> from peak.util.symbols import NOT_FOUND

>>> NOT_FOUND.__name__

>>> NOT_FOUND.__module__

The reason that symbols want to know their defining module is that this allows them to be pickled and unpickled correctly:

>>> import pickle
>>> pickle.loads(pickle.dumps(NOT_FOUND))

Specifically, it’s so that the result of unpickling a symbol is exactly the same object as the original symbol:

>>> pickle.loads(pickle.dumps(NOT_FOUND)) is NOT_FOUND

Note that this means the symbol must be defined at module level within its module, with the same name that’s passed in to it, or else pickle will not be able to find it when unpickling.

Last, but not least, symbol objects are immutable and cannot be changed in any way:

>>> = "bar"
Traceback (most recent call last):
TypeError: Symbols are immutable

Mailing List

Please direct questions regarding this package to the PEAK mailing list; see for details.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
SymbolType-1.0-py2.3.egg (7.8 kB) Copy SHA256 Checksum SHA256 2.3 Egg May 25, 2006
SymbolType-1.0-py2.4.egg (4.1 kB) Copy SHA256 Checksum SHA256 2.4 Egg May 25, 2006 (9.5 kB) Copy SHA256 Checksum SHA256 Source May 25, 2006

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting