pax_global_header 0000666 0000000 0000000 00000000064 13027056233 0014513 g ustar 00root root 0000000 0000000 52 comment=501d4a91def6fa3a715c712fc3eb700a44144b2b
sorted_containers-1.5.7/ 0000775 0000000 0000000 00000000000 13027056233 0015252 5 ustar 00root root 0000000 0000000 sorted_containers-1.5.7/.gitignore 0000664 0000000 0000000 00000000301 13027056233 0017234 0 ustar 00root root 0000000 0000000 # Python byte-code
*.py[co]
# virutalenv directories
/env*/
# coverage files
.coverage
# setup sdist, test and upload directories
/.tox/
/build/
/dist/
/sortedcontainers.egg-info/
.DS_Store sorted_containers-1.5.7/.pylintrc 0000664 0000000 0000000 00000030322 13027056233 0017117 0 ustar 00root root 0000000 0000000 [MASTER]
# Specify a configuration file.
#rcfile=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=CVS
# Pickle collected data for later comparisons.
persistent=yes
# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
load-plugins=
# Use multiple processes to speed up Pylint.
jobs=1
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-whitelist=
# Allow optimization of some AST trees. This will activate a peephole AST
# optimizer, which will apply various small optimizations. For instance, it can
# be used to obtain the result of joining multiple strings with the addition
# operator. Joining a lot of strings can lead to a maximum recursion error in
# Pylint and this flag can prevent that. It has one side effect, the resulting
# AST will be different than the one from reality.
optimize-ast=no
[MESSAGES CONTROL]
# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
confidence=
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
#enable=
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once).You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=import-star-module-level,old-octal-literal,oct-method,print-statement,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating
[REPORTS]
# Set the output format. Available formats are text, parseable, colorized, msvs
# (visual studio) and html. You can also give a reporter class, eg
# mypackage.mymodule.MyReporterClass.
output-format=text
# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
# written in a file name "pylint_global.[txt|html]".
files-output=no
# Tells whether to display a full report or only the messages
reports=yes
# Python expression which should return a note less than 10 (10 is the highest
# note). You have access to the variables errors warning, statement which
# respectively contain the number of errors / warnings messages and the total
# number of statements analyzed. This is used by the global evaluation report
# (RP0004).
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
# Template used to display messages. This is a python new-style format string
# used to format the message information. See doc for all details
#msg-template=
[BASIC]
# List of builtins function names that should not be used, separated by a comma
bad-functions=map,filter,input
# Good variable names which should always be accepted, separated by a comma
good-names=i,j,k,ex,Run,_
# Bad variable names which should always be refused, separated by a comma
bad-names=foo,bar,baz,toto,tutu,tata
# Colon-delimited sets of names that determine each other's naming style when
# the name regexes allow several styles.
name-group=
# Include a hint for the correct naming format with invalid-name
include-naming-hint=no
# Regular expression matching correct function names
function-rgx=[a-z_][a-z0-9_]{2,30}$
# Naming hint for function names
function-name-hint=[a-z_][a-z0-9_]{2,30}$
# Regular expression matching correct variable names
variable-rgx=[a-z_][a-z0-9_]{2,30}$
# Naming hint for variable names
variable-name-hint=[a-z_][a-z0-9_]{2,30}$
# Regular expression matching correct constant names
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
# Naming hint for constant names
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
# Regular expression matching correct attribute names
attr-rgx=[a-z_][a-z0-9_]{2,30}$
# Naming hint for attribute names
attr-name-hint=[a-z_][a-z0-9_]{2,30}$
# Regular expression matching correct argument names
argument-rgx=[a-z_][a-z0-9_]{2,30}$
# Naming hint for argument names
argument-name-hint=[a-z_][a-z0-9_]{2,30}$
# Regular expression matching correct class attribute names
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
# Naming hint for class attribute names
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
# Regular expression matching correct inline iteration names
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
# Naming hint for inline iteration names
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
# Regular expression matching correct class names
class-rgx=[A-Z_][a-zA-Z0-9]+$
# Naming hint for class names
class-name-hint=[A-Z_][a-zA-Z0-9]+$
# Regular expression matching correct module names
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
# Naming hint for module names
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
# Regular expression matching correct method names
method-rgx=[a-z_][a-z0-9_]{2,30}$
# Naming hint for method names
method-name-hint=[a-z_][a-z0-9_]{2,30}$
# Regular expression which should only match function or class names that do
# not require a docstring.
no-docstring-rgx=^_
# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
docstring-min-length=-1
[ELIF]
# Maximum number of nested blocks for function / method body
max-nested-blocks=5
[FORMAT]
# Maximum number of characters on a single line.
max-line-length=100
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )??$
# Allow the body of an if to be on the same line as the test if there is no
# else.
single-line-if-stmt=no
# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,dict-separator
# Maximum number of lines in a module
max-module-lines=2500
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
# tab).
indent-string=' '
# Number of spaces of indent required inside a hanging or continued line.
indent-after-paren=4
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
expected-line-ending-format=
[LOGGING]
# Logging modules to check that the string format arguments are in logging
# function parameter format
logging-modules=logging
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,XXX,TODO
[SIMILARITIES]
# Minimum lines number of a similarity.
min-similarity-lines=8
# Ignore comments when computing similarities.
ignore-comments=yes
# Ignore docstrings when computing similarities.
ignore-docstrings=yes
# Ignore imports when computing similarities.
ignore-imports=no
[SPELLING]
# Spelling dictionary name. Available dictionaries: none. To make it working
# install python-enchant package.
spelling-dict=
# List of comma separated words that should not be checked.
spelling-ignore-words=
# A path to a file that contains private dictionary; one word per line.
spelling-private-dict-file=
# Tells whether to store unknown words to indicated private dictionary in
# --spelling-private-dict-file option instead of raising a message.
spelling-store-unknown-words=no
[TYPECHECK]
# Tells whether missing members accessed in mixin class should be ignored. A
# mixin class is detected if its name ends with "mixin" (case insensitive).
ignore-mixin-members=yes
# List of module names for which member attributes should not be checked
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis. It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=
# List of classes names for which member attributes should not be checked
# (useful for classes with attributes dynamically set). This supports can work
# with qualified names.
ignored-classes=
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
generated-members=
[VARIABLES]
# Tells whether we should check for unused import in __init__ files.
init-import=no
# A regular expression matching the name of dummy variables (i.e. expectedly
# not used).
dummy-variables-rgx=_$|dummy
# List of additional names supposed to be defined in builtins. Remember that
# you should avoid to define new builtins when possible.
additional-builtins=
# List of strings which can identify a callback function by name. A callback
# name must start or end with one of those strings.
callbacks=cb_,_cb
[CLASSES]
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,__new__,setUp
# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls
# List of valid names for the first argument in a metaclass class method.
valid-metaclass-classmethod-first-arg=mcs
# List of member names, which should be excluded from the protected access
# warning.
exclude-protected=_asdict,_fields,_replace,_source,_make
[DESIGN]
# Maximum number of arguments for function / method
max-args=6
# Argument names that match this expression will be ignored. Default to name
# with leading underscore
ignored-argument-names=_.*
# Maximum number of locals for function / method body
max-locals=30
# Maximum number of return / yield for function / method body
max-returns=12
# Maximum number of branch for function / method body
max-branches=25
# Maximum number of statements in function / method body
max-statements=70
# Maximum number of parents for a class (see R0901).
max-parents=7
# Maximum number of attributes for a class (see R0902).
max-attributes=30
# Minimum number of public methods for a class (see R0903).
min-public-methods=2
# Maximum number of public methods for a class (see R0904).
max-public-methods=20
# Maximum number of boolean expressions in a if statement
max-bool-expr=5
[IMPORTS]
# Deprecated modules which should not be used, separated by a comma
deprecated-modules=regsub,TERMIOS,Bastion,rexec
# Create a graph of every (i.e. internal and external) dependencies in the
# given file (report RP0402 must not be disabled)
import-graph=
# Create a graph of external dependencies in the given file (report RP0402 must
# not be disabled)
ext-import-graph=
# Create a graph of internal dependencies in the given file (report RP0402 must
# not be disabled)
int-import-graph=
[EXCEPTIONS]
# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception
sorted_containers-1.5.7/.travis.yml 0000664 0000000 0000000 00000000234 13027056233 0017362 0 ustar 00root root 0000000 0000000 sudo: false
language: python
python:
- "2.6"
- "2.7"
- "3.2"
- "3.3"
- "3.4"
- "3.5"
- "pypy"
- "pypy3"
install: true
script: nosetests -v
sorted_containers-1.5.7/HISTORY.rst 0000664 0000000 0000000 00000013244 13027056233 0017151 0 ustar 00root root 0000000 0000000 Sorted Containers Release History
=================================
1.5.7 (2016-12-22)
------------------
**Bugfixes**
* Changed ``SortedList.__setitem__`` to support slices with stop less than
start and step equal one.
1.5.6 (2016-12-09)
------------------
**Bugfixes**
* Changed ``SortedList.__setitem__`` to support slices that alias itself.
1.5.5 (2016-12-05)
------------------
**Bugfixes**
* Changed ``SortedList.extend`` to support empty iterables.
1.5.4 (2016-10-16)
------------------
**Bugfixes**
* Changed ``SortedList.__new__`` to call ``SortedListWithKey.__init__`` once
instead of twice.
1.5.3 (2016-06-01)
------------------
**Miscellaneous**
* Updated documentation with PyCon 2016 Talk.
1.5.2 (2016-05-28)
------------------
**API Changes**
* Added ``SortedDict.peekitem`` method.
1.5.1 (2016-05-26)
------------------
**Miscellaneous**
* Added support for PyLint and minor source changes.
* Dropped Python 3.2 support from tox testing due to virtualenv limitations.
1.5.0 (2016-05-26)
------------------
**Miscellaneous**
* Added Performance at Scale documentation.
1.4.3 (2015-12-03)
------------------
**Miscellaneous**
* Updated documentation with SF Python 2015 Holiday Meetup Talk.
1.4.2 (2015-10-20)
------------------
**API Changes**
* Changed ``SortedList`` initializer to support key-argument callable and
automatically return ``SortedListWithKey`` when present.
* Changed ``SortedListWithKey`` to inherit from ``SortedList``.
* Changed ``SortedSet.__ior__`` to call `update` rather than `union`.
* Changed SortedList comparison to match Sequence semantics as described in
CPython Language Reference Section 5.9.
* Changed SortedSet comparison to raise NotImplemented on type mismatch.
* Removed SortedList.as_list method. Use ``list(sorted_list)`` instead.
* Removed SortedList._slice method. Use ``slice.indices`` instead.
* Added private references to public methods for internal use to ease
method over-loading.
**Bugfixes**
* Changed sorteddict.ValuesView.count to correctly reference sorted dictionary.
**Improvements**
* ``SortedList.__getitem__`` now 35% faster for indexing at beginning and end.
* ``SortedList.pop`` now 35% faster by inlining fast-paths.
* ``del sorted_list[:]`` now calls `clear` and is much faster.
* ``sorted_list[:] = values`` now calls `clear` and `update` and is much faster.
**Miscellaneous**
* Added Python 3.5 support in tox testing.
* Added discussion of `ruamel.ordereddict.sorteddict` to performance
documentation.
* Merged file ``sortedlistwithkey.py`` into ``sortedlist.py``.
0.9.6 (2015-06-22)
------------------
**API Changes**
* Added ``islice`` method to sorted list, dict, and set types.
* Added ``irange`` and ``irange_key`` method to sorted list, dict, and set
types.
0.9.5 (2015-03-16)
------------------
**API Changes**
* Added ``bisect_key`` methods to sorted list, dict, and set types.
* Added ``last=True`` argument to ``SortedDict.popitem``.
0.9.4 (2014-12-04)
------------------
**Bugfixes**
* Added implementation and testing for Python pickle module.
0.9.3 (2014-11-30)
------------------
**API Changes**
* Removed ``SortedListWithKeyPair`` type.
**Improvements**
* Changed type references to ``self.__class__`` as able.
0.9.2 (2014-10-20)
------------------
**API Changes**
* Removed ``value_orderable`` argument from ``SortedListWithKey`` initializer.
* Added key-callable argument to ``SortedDict`` initializer.
* Added key-callable argument to ``SortedSet`` initializer.
**Improvements**
* Changed ``SortedDict`` to inherit directly from ``dict``.
**Miscellaneous**
* Added PyPy3 support to tox testing.
* Added ``SortedListWithKey`` to sorted list performance comparison
documentation.
0.9.1 (2014-09-20)
------------------
**Bugfixes**
* Changed ``SortedList.__setitem__`` with slices to correctly update internal
"maxes" index.
0.9.0 (2014-09-17)
------------------
**API Changes**
* Added ``__ior__``, ``__iand__``, ``__isub__``, and ``__ixor__`` methods to
``SortedSet`` interface.
**Improvements**
* Changed position-based indexing to use dense tree-based index.
**Miscellaneous**
* Added workload-based performance comparison for sorted list: Priority Queue,
Multiset, etc.
0.8.5 (2014-08-11)
------------------
**Bugfixes**
* Changed copy methods to make shallow copies: values are not copied, only
references to values are copied.
**Miscellaneous**
* Added load-factor performance comparison documentation.
0.8.4 (2014-07-29)
------------------
**API Changes**
* Added ``value_orderable`` parameter to ``SortedListWithKey`` to support
incomparable value types.
**Bugfixes**
* Changed ``repr`` methods to prevent infinite recursion and allow easier
subclassing.
0.8.3 (2014-07-07)
------------------
**Miscellaneous**
* Added more testing for sorted lists with key-callable argument.
0.8.2 (2014-06-13)
------------------
**API Changes**
* Added ``SortedListWithKey`` type with implementation based on
``(key, value)`` tuples.
0.8.1 (2014-05-08)
------------------
**Bugfixes**
* Added contains-key check in sorted dict equality comparisons.
**Miscellaneous**
* Added Python runtime comparison to documentation.
* Added sorted dict and set comparison to benchmark documentation.
* Added Travis-CI testing.
0.8.0 (2014-04-08)
------------------
**API Changes**
* Added ``bisect`` methods from ``SortedList`` to ``SortedDict`` interface.
0.7.0 (2014-04-02)
------------------
**Miscellaneous**
* Added Banyan module to benchmark documentation.
0.6.0 (2014-03-18)
------------------
**Miscellaneous**
* Added testing support for CPython 2.6, 2.7, 3.2, and 3.3 with full coverage.
0.5.0 (2014-03-14)
------------------
* Initial release of sorted list, dict, and set types.
sorted_containers-1.5.7/LICENSE 0000664 0000000 0000000 00000001055 13027056233 0016260 0 ustar 00root root 0000000 0000000 Copyright 2014-2016 Grant Jenks
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
sorted_containers-1.5.7/MANIFEST.in 0000664 0000000 0000000 00000000033 13027056233 0017004 0 ustar 00root root 0000000 0000000 include README.rst LICENSE
sorted_containers-1.5.7/README.rst 0000664 0000000 0000000 00000020555 13027056233 0016750 0 ustar 00root root 0000000 0000000 Python SortedContainers
=======================
.. image:: https://api.travis-ci.org/grantjenks/sorted_containers.svg
:target: http://www.grantjenks.com/docs/sortedcontainers/
`SortedContainers`_ is an Apache2 licensed `sorted collections library`_,
written in pure-Python, and fast as C-extensions.
Python's standard library is great until you need a sorted collections
type. Many will attest that you can get really far without one, but the moment
you **really need** a sorted list, dict, or set, you're faced with a dozen
different implementations, most using C-extensions without great documentation
and benchmarking.
In Python, we can do better. And we can do it in pure-Python!
.. code-block:: python
>>> sl = sortedcontainers.SortedList(xrange(10000000))
>>> 1234567 in sl
True
>>> sl[7654321]
7654321
>>> sl.add(1234567)
>>> sl.count(1234567)
2
>>> sl *= 3
>>> len(sl)
30000003
**Note:** don't try this without at least a half gigabyte of memory. In Python
an integer requires about 24 bytes. SortedList will add about 8 bytes per
object stored in the container. That's pretty hard to beat as it's the cost of
a pointer to each object. It's also 66% less overhead than a typical binary
tree implementation (e.g. red-black tree, avl tree, aa tree, splay tree, treap,
etc.) for which every node must also store two pointers to children nodes.
`SortedContainers`_ takes all of the work out of Python sorted collections -
making your deployment and use of Python easy. There's no need to install a C
compiler or pre-build and distribute custom extensions. Performance is a
feature and testing has 100% coverage with unit tests and hours of stress.
.. _`SortedContainers`: http://www.grantjenks.com/docs/sortedcontainers/
.. _`sorted collections library`: http://www.grantjenks.com/docs/sortedcontainers/
Testimonials
------------
**Alex Martelli**, `Wikipedia`_
Good stuff! ... I like the `simple, effective implementation`_ idea of splitting
the sorted containers into smaller "fragments" to avoid the O(N) insertion costs.
.. _`Wikipedia`: http://en.wikipedia.org/wiki/Alex_Martelli
.. _`simple, effective implementation`: http://www.grantjenks.com/docs/sortedcontainers/implementation.html
**Jeff Knupp**, `Review of SortedContainers`_
That last part, "fast as C-extensions," was difficult to believe. I would need
some sort of `Performance Comparison`_ to be convinced this is true. The author
includes this in the docs. It is.
.. _`Review of SortedContainers`: http://reviews.jeffknupp.com/reviews/sortedcontainers/3/
**Kevin Samuel**, `Formations Python`_
I'm quite amazed, not just by the code quality (it's incredibly
readable and has more comment than code, wow), but the actual
amount of work you put at stuff that is *not* code:
documentation, benchmarking, implementation explanations. Even
the git log is clean and the unit tests run out of the box on
Python 2 and 3.
.. _`Formations Python`: http://formationspython.com/
**Mark Summerfield**, a short plea for `Python Sorted Collections`_
Python's "batteries included" standard library seems to have a battery
missing. And the argument that "we never had it before" has worn thin. It is
time that Python offered a full range of collection classes out of the box,
including sorted ones.
.. _`Python Sorted Collections`: http://www.qtrac.eu/pysorted.html
Features
--------
- Pure-Python
- Fully documented
- Benchmark comparison (alternatives, runtimes, load-factors)
- 100% test coverage
- Hours of stress testing
- Performance matters (often faster than C implementations)
- Compatible API (nearly identical to popular blist and rbtree modules)
- Feature-rich (e.g. get the five largest keys in a sorted dict: d.iloc[-5:])
- Pragmatic design (e.g. SortedSet is a Python set with a SortedList index)
- Developed on Python 2.7
- Tested on CPython 2.6, 2.7, 3.2, 3.3, 3.4, 3.5 and PyPy 5.1+, PyPy3 2.4+
Quickstart
----------
Installing `SortedContainers`_ is simple with
`pip `_::
$ pip install sortedcontainers
You can access documentation in the interpreter with Python's built-in help
function:
.. code-block:: python
>>> from sortedcontainers import SortedList, SortedSet, SortedDict
>>> help(SortedList)
Documentation
-------------
Complete documentation including performance comparisons is available at
http://www.grantjenks.com/docs/sortedcontainers/ .
User Guide
..........
For those wanting more details, this part of the documentation describes
introduction, implementation, performance, and development.
- `Introduction`_
- `Performance Comparison`_
- `Load Factor Performance Comparison`_
- `Runtime Performance Comparison`_
- `Simulated Workload Performance Comparison`_
- `Implementation Details`_
- `Performance at Scale`_
- `Developing and Contributing`_
- `Release History`_
.. _`Introduction`: http://www.grantjenks.com/docs/sortedcontainers/introduction.html
.. _`Performance Comparison`: http://www.grantjenks.com/docs/sortedcontainers/performance.html
.. _`Load Factor Performance Comparison`: http://www.grantjenks.com/docs/sortedcontainers/performance-load.html
.. _`Runtime Performance Comparison`: http://www.grantjenks.com/docs/sortedcontainers/performance-runtime.html
.. _`Simulated Workload Performance Comparison`: http://www.grantjenks.com/docs/sortedcontainers/performance-workload.html
.. _`Implementation Details`: http://www.grantjenks.com/docs/sortedcontainers/implementation.html
.. _`Performance at Scale`: http://www.grantjenks.com/docs/sortedcontainers/performance-scale.html
.. _`Developing and Contributing`: http://www.grantjenks.com/docs/sortedcontainers/development.html
.. _`Release History`: http://www.grantjenks.com/docs/sortedcontainers/history.html
API Documentation
.................
If you are looking for information on a specific function, class or method, this
part of the documentation is for you.
- `SortedList`_
- `SortedListWithKey`_
- `SortedDict`_
- `SortedSet`_
.. _`SortedList`: http://www.grantjenks.com/docs/sortedcontainers/sortedlist.html
.. _`SortedListWithKey`: http://www.grantjenks.com/docs/sortedcontainers/sortedlistwithkey.html
.. _`SortedDict`: http://www.grantjenks.com/docs/sortedcontainers/sorteddict.html
.. _`SortedSet`: http://www.grantjenks.com/docs/sortedcontainers/sortedset.html
Talks
-----
- `Python Sorted Collections | PyCon 2016 Talk`_
- `SF Python Holiday Party 2015 Lightning Talk`_
- `DjangoCon 2015 Lightning Talk`_
.. _`Python Sorted Collections | PyCon 2016 Talk`: http://www.grantjenks.com/docs/sortedcontainers/pycon-2016-talk.html
.. _`SF Python Holiday Party 2015 Lightning Talk`: http://www.grantjenks.com/docs/sortedcontainers/sf-python-2015-lightning-talk.html
.. _`DjangoCon 2015 Lightning Talk`: http://www.grantjenks.com/docs/sortedcontainers/djangocon-2015-lightning-talk.html
Contribute
----------
Collaborators are welcome!
#. Check for open issues or open a fresh issue to start a discussion around a
bug. There is a Contributor Friendly tag for issues that should be used by
people who are not very familiar with the codebase yet.
#. Fork the `SortedContainers repository
`_ on GitHub and start
making your changes to a new branch.
#. Write a test which shows that the bug was fixed.
#. Send a pull request and bug the maintainer until it gets merged and
published.
Useful Links
------------
- `SortedContainers Documentation`_
- `SortedContainers at PyPI`_
- `SortedContainers at Github`_
- `SortedContainers Issue Tracker`_
.. _`SortedContainers Documentation`: http://www.grantjenks.com/docs/sortedcontainers/
.. _`SortedContainers at PyPI`: https://pypi.python.org/pypi/sortedcontainers
.. _`SortedContainers at Github`: https://github.com/grantjenks/sorted_containers
.. _`SortedContainers Issue Tracker`: https://github.com/grantjenks/sorted_containers/issues
SortedContainers License
------------------------
Copyright 2014-2016 Grant Jenks
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
sorted_containers-1.5.7/docs/ 0000775 0000000 0000000 00000000000 13027056233 0016202 5 ustar 00root root 0000000 0000000 sorted_containers-1.5.7/docs/Makefile 0000664 0000000 0000000 00000015222 13027056233 0017644 0 ustar 00root root 0000000 0000000 # Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
help:
@echo "Please use \`make ' where is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/sortedcontainers.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/sortedcontainers.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/sortedcontainers"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/sortedcontainers"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
sorted_containers-1.5.7/docs/_static/ 0000775 0000000 0000000 00000000000 13027056233 0017630 5 ustar 00root root 0000000 0000000 sorted_containers-1.5.7/docs/_static/SortedDict-contains.png 0000664 0000000 0000000 00000254723 13027056233 0024233 0 ustar 00root root 0000000 0000000 PNG
IHDR X vp sBIT|d pHYs a a?i IDATxy\M9J+%#mȒd
R![0S|0}L7{6mXZPRJhm~>=L9>~jλ9c B!9; B!BHA !B!Dn(!B!
% B!B!"7B!BB!BPB!BJ@!B!rC !B!Dn(!B!
% B!B!"7B!BB!BPB!BJ@!B!rC !B!Dn(!B!
% B!B!"7B!BB!BPB!BJ@!B!rC !B!Dn(!B!
% B!B!"7B!BB!BPB!BJ@!B!rC !B!Dn(!B!
% B!B!"7BZH<˗71wgϞF;fKsi:::yǏoH+6}t<(!=
wwwBYYٳq&<RKQQm۶EN͛7#//OǁonnKK:$7PWW
ϟU7n0cbĉM.yԷW1~& !&0B@v:wAhh(1z&]Y8cǎ =BTT;o7n~ǏG>}`ddԠ \>}[lAXX]:gϞEii)֯_ &4Y;?W_
F=.!QBH8::"22mڴ(/))כ)1n8L6MbP(Ď;`̘17ښԔwݱl2 ÇrJl߾=eiHFHc200AsAi4ʕ+8~~~R bRʰzjCCCpssCXXTt<3f{0aݻwyDFF1&1hРAaeeUUUaرynϞ=̙3ahhuuu8::
1k,lٲ1,Zry:~ff&,X kkkAWW...Xr%'%##iii`ƌ 0g0_I~?ѦMhjjo߾8xq|g&&&ՅSPPKǸ>M:@EE&&&t8{CSSS<