deleted README.md and modified/renamed README.txt to README.rst and changed from distutils to setuptools in order to treat README.rst as the standard README instead of README.txt
This commit is contained in:
parent
1bcc5d3a64
commit
670d9817fa
33
README.md
33
README.md
|
@ -1,33 +0,0 @@
|
|||
frozendict
|
||||
==========
|
||||
|
||||
`frozendict` is an immutable wrapper around dictionaries that implements the
|
||||
complete mapping interface. It can be used as a drop-in replacement for
|
||||
dictionaries where immutability is desired.
|
||||
|
||||
Of course, this is `python`, and you can still poke around the object's
|
||||
internals if you want.
|
||||
|
||||
The `frozendict` constructor mimics `dict`, and all of the expected
|
||||
interfaces (`iter`, `len`, `repr`, `hash`, `getitem`) are provided.
|
||||
Note that a `frozendict` does not guarantee the immutability of its values, so
|
||||
the utility of `hash` method is restricted by usage.
|
||||
|
||||
The only difference is that the `copy()` method of `frozendict` takes
|
||||
variable keyword arguments, which will be present as key/value pairs in the new,
|
||||
immutable copy.
|
||||
|
||||
Example shell usage:
|
||||
|
||||
from frozendict import frozendict
|
||||
|
||||
fd = frozendict({ 'hello': 'World' })
|
||||
|
||||
print fd
|
||||
# <frozendict {'hello': 'World'}>
|
||||
|
||||
print fd['hello']
|
||||
# 'World'
|
||||
|
||||
print fd.copy(another='key/value')
|
||||
# <frozendict {'hello': 'World', 'another': 'key/value'}>
|
|
@ -18,7 +18,9 @@ The only difference is that the ``copy()`` method of ``frozendict`` takes
|
|||
variable keyword arguments, which will be present as key/value pairs in the new,
|
||||
immutable copy.
|
||||
|
||||
Example shell usage::
|
||||
Example shell usage:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from frozendict import frozendict
|
||||
|
4
setup.py
4
setup.py
|
@ -1,4 +1,4 @@
|
|||
from distutils.core import setup
|
||||
from setuptools import setup
|
||||
|
||||
setup(
|
||||
name = 'frozendict',
|
||||
|
@ -12,5 +12,5 @@ setup(
|
|||
license = 'MIT License',
|
||||
|
||||
description = 'An immutable dictionary',
|
||||
long_description = open('README.txt').read()
|
||||
long_description = open('README.rst').read()
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue