././@PaxHeader 0000000 0000000 0000000 00000000033 00000000000 011451 x ustar 00 0000000 0000000 27 mtime=1600892190.729916
cytoolz-0.11.0/ 0000755 0000766 0000024 00000000000 00000000000 013670 5 ustar 00ewelch staff 0000000 0000000 ././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 011453 x ustar 00 0000000 0000000 22 mtime=1600891528.0
cytoolz-0.11.0/LICENSE.txt 0000644 0000766 0000024 00000002721 00000000000 015515 0 ustar 00ewelch staff 0000000 0000000 Copyright (c) 2014 Erik Welch
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
a. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
b. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
c. Neither the name of cytoolz nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 011453 x ustar 00 0000000 0000000 22 mtime=1600891528.0
cytoolz-0.11.0/MANIFEST.in 0000644 0000766 0000024 00000000060 00000000000 015422 0 ustar 00ewelch staff 0000000 0000000 include LICENSE.txt
include cytoolz/tests/*.py
././@PaxHeader 0000000 0000000 0000000 00000000034 00000000000 011452 x ustar 00 0000000 0000000 28 mtime=1600892190.7295277
cytoolz-0.11.0/PKG-INFO 0000644 0000766 0000024 00000011325 00000000000 014767 0 ustar 00ewelch staff 0000000 0000000 Metadata-Version: 2.1
Name: cytoolz
Version: 0.11.0
Summary: Cython implementation of Toolz: High performance functional utilities
Home-page: https://github.com/pytoolz/cytoolz
Author: https://raw.github.com/pytoolz/cytoolz/master/AUTHORS.md
Author-email: erik.n.welch@gmail.com
Maintainer: Erik Welch
Maintainer-email: erik.n.welch@gmail.com
License: BSD
Description: CyToolz
=======
|Build Status| |Version Status|
Cython implementation of the
|literal toolz|_ `package, `__ which
provides high performance utility functions for iterables, functions,
and dictionaries.
.. |literal toolz| replace:: ``toolz``
.. _literal toolz: https://github.com/pytoolz/toolz
``toolz`` is a pure Python package that borrows heavily from contemporary
functional languanges. It is designed to interoperate seamlessly with other
libraries including ``itertools``, ``functools``, and third party libraries.
High performance functional data analysis is possible with builtin types
like ``list`` and ``dict``, and user-defined data structures; and low memory
usage is achieved by using the iterator protocol and returning iterators
whenever possible.
``cytoolz`` implements the same API as ``toolz``. The main differences are
that ``cytoolz`` is faster (typically 2-5x faster with a few spectacular
exceptions) and ``cytoolz`` offers a C API that is accessible to other
projects developed in Cython. Since ``toolz`` is able to process very
large (potentially infinite) data sets, the performance increase gained by
using ``cytoolz`` can be significant.
See the PyToolz documentation at https://toolz.readthedocs.io and the full
`API Documentation `__
for more details.
LICENSE
-------
New BSD. See `License File `__.
Install
-------
``cytoolz`` is on the Python Package Index (PyPI):
::
pip install cytoolz
Dependencies
------------
``cytoolz`` supports Python 2.7+ and Python 3.4+ with a common codebase.
It is developed in Cython, but requires no dependecies other than CPython
and a C compiler. Like ``toolz``, it is a light weight dependency.
Contributions Welcome
---------------------
``toolz`` (and ``cytoolz``) aims to be a repository for utility functions,
particularly those that come from the functional programming and list
processing traditions. We welcome contributions that fall within this scope
and encourage users to scrape their ``util.py`` files for functions that are
broadly useful.
Please take a look at our issue pages for
`toolz `__ and
`cytoolz `__
for contribution ideas.
Community
---------
See our `mailing list `__.
We're friendly.
.. |Build Status| image:: https://travis-ci.org/pytoolz/cytoolz.svg?branch=master
:target: https://travis-ci.org/pytoolz/cytoolz
.. |Version Status| image:: https://badge.fury.io/py/cytoolz.svg
:target: http://badge.fury.io/py/cytoolz
Keywords: functional utility itertools functools iterator generator curry memoize lazy streaming bigdata cython toolz cytoolz
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Cython
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Provides-Extra: cython
././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 011453 x ustar 00 0000000 0000000 22 mtime=1600891528.0
cytoolz-0.11.0/README.rst 0000644 0000766 0000024 00000005242 00000000000 015362 0 ustar 00ewelch staff 0000000 0000000 CyToolz
=======
|Build Status| |Version Status|
Cython implementation of the
|literal toolz|_ `package, `__ which
provides high performance utility functions for iterables, functions,
and dictionaries.
.. |literal toolz| replace:: ``toolz``
.. _literal toolz: https://github.com/pytoolz/toolz
``toolz`` is a pure Python package that borrows heavily from contemporary
functional languanges. It is designed to interoperate seamlessly with other
libraries including ``itertools``, ``functools``, and third party libraries.
High performance functional data analysis is possible with builtin types
like ``list`` and ``dict``, and user-defined data structures; and low memory
usage is achieved by using the iterator protocol and returning iterators
whenever possible.
``cytoolz`` implements the same API as ``toolz``. The main differences are
that ``cytoolz`` is faster (typically 2-5x faster with a few spectacular
exceptions) and ``cytoolz`` offers a C API that is accessible to other
projects developed in Cython. Since ``toolz`` is able to process very
large (potentially infinite) data sets, the performance increase gained by
using ``cytoolz`` can be significant.
See the PyToolz documentation at https://toolz.readthedocs.io and the full
`API Documentation `__
for more details.
LICENSE
-------
New BSD. See `License File `__.
Install
-------
``cytoolz`` is on the Python Package Index (PyPI):
::
pip install cytoolz
Dependencies
------------
``cytoolz`` supports Python 2.7+ and Python 3.4+ with a common codebase.
It is developed in Cython, but requires no dependecies other than CPython
and a C compiler. Like ``toolz``, it is a light weight dependency.
Contributions Welcome
---------------------
``toolz`` (and ``cytoolz``) aims to be a repository for utility functions,
particularly those that come from the functional programming and list
processing traditions. We welcome contributions that fall within this scope
and encourage users to scrape their ``util.py`` files for functions that are
broadly useful.
Please take a look at our issue pages for
`toolz `__ and
`cytoolz `__
for contribution ideas.
Community
---------
See our `mailing list `__.
We're friendly.
.. |Build Status| image:: https://travis-ci.org/pytoolz/cytoolz.svg?branch=master
:target: https://travis-ci.org/pytoolz/cytoolz
.. |Version Status| image:: https://badge.fury.io/py/cytoolz.svg
:target: http://badge.fury.io/py/cytoolz
././@PaxHeader 0000000 0000000 0000000 00000000034 00000000000 011452 x ustar 00 0000000 0000000 28 mtime=1600892190.7143202
cytoolz-0.11.0/cytoolz/ 0000755 0000766 0000024 00000000000 00000000000 015373 5 ustar 00ewelch staff 0000000 0000000 ././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 011453 x ustar 00 0000000 0000000 22 mtime=1600891528.0
cytoolz-0.11.0/cytoolz/__init__.pxd 0000644 0000766 0000024 00000001356 00000000000 017654 0 ustar 00ewelch staff 0000000 0000000 from cytoolz.itertoolz cimport (
accumulate, c_merge_sorted, cons, count, drop, get, groupby, first,
frequencies, interleave, interpose, isdistinct, isiterable, iterate,
last, mapcat, nth, partition, partition_all, pluck, reduceby, remove,
rest, second, sliding_window, take, tail, take_nth, unique, join,
c_diff, topk, peek, random_sample, concat)
from cytoolz.functoolz cimport (
c_compose, c_juxt, memoize, c_pipe, c_thread_first, c_thread_last,
complement, curry, do, identity, excepts, flip)
from cytoolz.dicttoolz cimport (
assoc, c_merge, c_merge_with, c_dissoc, get_in, keyfilter, keymap,
itemfilter, itemmap, update_in, valfilter, valmap, assoc_in)
from cytoolz.recipes cimport countby, partitionby
././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 011453 x ustar 00 0000000 0000000 22 mtime=1600891528.0
cytoolz-0.11.0/cytoolz/__init__.py 0000644 0000766 0000024 00000000727 00000000000 017512 0 ustar 00ewelch staff 0000000 0000000 from .itertoolz import *
from .functoolz import *
from .dicttoolz import *
from .recipes import *
from functools import partial, reduce
sorted = sorted
map = map
filter = filter
# Aliases
comp = compose
# Always-curried functions
flip = functoolz.flip = curry(functoolz.flip)
memoize = functoolz.memoize = curry(functoolz.memoize)
from . import curried # sandbox
functoolz._sigs.update_signature_registry()
from ._version import __version__, __toolz_version__
././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 011453 x ustar 00 0000000 0000000 22 mtime=1600891528.0
cytoolz-0.11.0/cytoolz/_signatures.py 0000644 0000766 0000024 00000010404 00000000000 020267 0 ustar 00ewelch staff 0000000 0000000 from toolz._signatures import *
from toolz._signatures import (_is_arity, _has_varargs, _has_keywords,
_num_required_args, _is_partial_args, _is_valid_args)
cytoolz_info = {}
cytoolz_info['cytoolz.dicttoolz'] = dict(
assoc=[
lambda d, key, value, factory=dict: None],
assoc_in=[
lambda d, keys, value, factory=dict: None],
dissoc=[
lambda d, *keys, **kwargs: None],
get_in=[
lambda keys, coll, default=None, no_default=False: None],
itemfilter=[
lambda predicate, d, factory=dict: None],
itemmap=[
lambda func, d, factory=dict: None],
keyfilter=[
lambda predicate, d, factory=dict: None],
keymap=[
lambda func, d, factory=dict: None],
merge=[
lambda *dicts, **kwargs: None],
merge_with=[
lambda func, *dicts, **kwargs: None],
update_in=[
lambda d, keys, func, default=None, factory=dict: None],
valfilter=[
lambda predicate, d, factory=dict: None],
valmap=[
lambda func, d, factory=dict: None],
)
cytoolz_info['cytoolz.functoolz'] = dict(
apply=[
lambda *func_and_args, **kwargs: None],
Compose=[
lambda *funcs: None],
complement=[
lambda func: None],
compose=[
lambda *funcs: None],
compose_left=[
lambda *funcs: None],
curry=[
lambda *args, **kwargs: None],
do=[
lambda func, x: None],
excepts=[
lambda exc, func, handler=None: None],
flip=[
lambda: None,
lambda func: None,
lambda func, a: None,
lambda func, a, b: None],
_flip=[
lambda func, a, b: None],
identity=[
lambda x: None],
juxt=[
lambda *funcs: None],
memoize=[
lambda cache=None, key=None: None,
lambda func, cache=None, key=None: None],
_memoize=[
lambda func, cache=None, key=None: None],
pipe=[
lambda data, *funcs: None],
return_none=[
lambda exc: None],
thread_first=[
lambda val, *forms: None],
thread_last=[
lambda val, *forms: None],
)
cytoolz_info['cytoolz.itertoolz'] = dict(
accumulate=[
lambda binop, seq, initial='__no__default__': None],
concat=[
lambda seqs: None],
concatv=[
lambda *seqs: None],
cons=[
lambda el, seq: None],
count=[
lambda seq: None],
diff=[
lambda *seqs, **kwargs: None],
drop=[
lambda n, seq: None],
first=[
lambda seq: None],
frequencies=[
lambda seq: None],
get=[
lambda ind, seq, default=None: None],
getter=[
lambda index: None],
groupby=[
lambda key, seq: None],
identity=[
lambda x: None],
interleave=[
lambda seqs: None],
interpose=[
lambda el, seq: None],
isdistinct=[
lambda seq: None],
isiterable=[
lambda x: None],
iterate=[
lambda func, x: None],
join=[
lambda leftkey, leftseq, rightkey, rightseq, left_default=None, right_default=None: None],
last=[
lambda seq: None],
mapcat=[
lambda func, seqs: None],
merge_sorted=[
lambda *seqs, **kwargs: None],
nth=[
lambda n, seq: None],
partition=[
lambda n, seq, pad=None: None],
partition_all=[
lambda n, seq: None],
peek=[
lambda seq: None],
peekn=[
lambda n, seq: None],
pluck=[
lambda ind, seqs, default=None: None],
random_sample=[
lambda prob, seq, random_state=None: None],
reduceby=[
lambda key, binop, seq, init=None: None],
remove=[
lambda predicate, seq: None],
rest=[
lambda seq: None],
second=[
lambda seq: None],
sliding_window=[
lambda n, seq: None],
tail=[
lambda n, seq: None],
take=[
lambda n, seq: None],
take_nth=[
lambda n, seq: None],
topk=[
lambda k, seq, key=None: None],
unique=[
lambda seq, key=None: None],
)
cytoolz_info['cytoolz.recipes'] = dict(
countby=[
lambda key, seq: None],
partitionby=[
lambda func, seq: None],
)
def update_signature_registry():
create_signature_registry(cytoolz_info)
module_info.update(cytoolz_info)
././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 011453 x ustar 00 0000000 0000000 22 mtime=1600891537.0
cytoolz-0.11.0/cytoolz/_version.py 0000644 0000766 0000024 00000000064 00000000000 017571 0 ustar 00ewelch staff 0000000 0000000 __version__ = '0.11.0'
__toolz_version__ = '0.11.0'
././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 011453 x ustar 00 0000000 0000000 22 mtime=1600891528.0
cytoolz-0.11.0/cytoolz/compatibility.py 0000644 0000766 0000024 00000001727 00000000000 020625 0 ustar 00ewelch staff 0000000 0000000 import warnings
warnings.warn("The toolz.compatibility module is no longer "
"needed in Python 3 and has been deprecated. Please "
"import these utilities directly from the standard library. "
"This module will be removed in a future release.",
category=DeprecationWarning)
import operator
import sys
PY3 = sys.version_info[0] > 2
PY34 = sys.version_info[0] == 3 and sys.version_info[1] == 4
PYPY = hasattr(sys, 'pypy_version_info') and PY3
__all__ = ('map', 'filter', 'range', 'zip', 'reduce', 'zip_longest',
'iteritems', 'iterkeys', 'itervalues', 'filterfalse',
'PY3', 'PY34', 'PYPY')
map = map
filter = filter
range = range
zip = zip
from functools import reduce
from itertools import zip_longest
from itertools import filterfalse
iteritems = operator.methodcaller('items')
iterkeys = operator.methodcaller('keys')
itervalues = operator.methodcaller('values')
from collections.abc import Sequence
././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 011453 x ustar 00 0000000 0000000 22 mtime=1600891528.0
cytoolz-0.11.0/cytoolz/cpython.pxd 0000644 0000766 0000024 00000000761 00000000000 017600 0 ustar 00ewelch staff 0000000 0000000 """ Additional bindings to Python's C-API.
These differ from Cython's bindings in ``cpython``.
"""
from cpython.ref cimport PyObject
cdef extern from "Python.h":
PyObject* PtrIter_Next "PyIter_Next"(object o)
PyObject* PtrObject_Call "PyObject_Call"(object callable_object, object args, object kw)
PyObject* PtrObject_GetItem "PyObject_GetItem"(object o, object key)
int PyDict_Next_Compat "PyDict_Next"(object p, Py_ssize_t *ppos, PyObject* *pkey, PyObject* *pvalue) except -1
././@PaxHeader 0000000 0000000 0000000 00000000034 00000000000 011452 x ustar 00 0000000 0000000 28 mtime=1600892190.7192204
cytoolz-0.11.0/cytoolz/curried/ 0000755 0000766 0000024 00000000000 00000000000 017030 5 ustar 00ewelch staff 0000000 0000000 ././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 011453 x ustar 00 0000000 0000000 22 mtime=1600891528.0
cytoolz-0.11.0/cytoolz/curried/__init__.py 0000644 0000766 0000024 00000005504 00000000000 021145 0 ustar 00ewelch staff 0000000 0000000 """
Alternate namespace for cytoolz such that all functions are curried
Currying provides implicit partial evaluation of all functions
Example:
Get usually requires two arguments, an index and a collection
>>> from cytoolz.curried import get
>>> get(0, ('a', 'b'))
'a'
When we use it in higher order functions we often want to pass a partially
evaluated form
>>> data = [(1, 2), (11, 22), (111, 222)]
>>> list(map(lambda seq: get(0, seq), data))
[1, 11, 111]
The curried version allows simple expression of partial evaluation
>>> list(map(get(0), data))
[1, 11, 111]
See Also:
cytoolz.functoolz.curry
"""
import cytoolz
from . import operator
from cytoolz import (
apply,
comp,
complement,
compose,
compose_left,
concat,
concatv,
count,
curry,
diff,
first,
flip,
frequencies,
identity,
interleave,
isdistinct,
isiterable,
juxt,
last,
memoize,
merge_sorted,
peek,
pipe,
second,
thread_first,
thread_last,
)
from .exceptions import merge, merge_with
accumulate = cytoolz.curry(cytoolz.accumulate)
assoc = cytoolz.curry(cytoolz.assoc)
assoc_in = cytoolz.curry(cytoolz.assoc_in)
cons = cytoolz.curry(cytoolz.cons)
countby = cytoolz.curry(cytoolz.countby)
dissoc = cytoolz.curry(cytoolz.dissoc)
do = cytoolz.curry(cytoolz.do)
drop = cytoolz.curry(cytoolz.drop)
excepts = cytoolz.curry(cytoolz.excepts)
filter = cytoolz.curry(cytoolz.filter)
get = cytoolz.curry(cytoolz.get)
get_in = cytoolz.curry(cytoolz.get_in)
groupby = cytoolz.curry(cytoolz.groupby)
interpose = cytoolz.curry(cytoolz.interpose)
itemfilter = cytoolz.curry(cytoolz.itemfilter)
itemmap = cytoolz.curry(cytoolz.itemmap)
iterate = cytoolz.curry(cytoolz.iterate)
join = cytoolz.curry(cytoolz.join)
keyfilter = cytoolz.curry(cytoolz.keyfilter)
keymap = cytoolz.curry(cytoolz.keymap)
map = cytoolz.curry(cytoolz.map)
mapcat = cytoolz.curry(cytoolz.mapcat)
nth = cytoolz.curry(cytoolz.nth)
partial = cytoolz.curry(cytoolz.partial)
partition = cytoolz.curry(cytoolz.partition)
partition_all = cytoolz.curry(cytoolz.partition_all)
partitionby = cytoolz.curry(cytoolz.partitionby)
peekn = cytoolz.curry(cytoolz.peekn)
pluck = cytoolz.curry(cytoolz.pluck)
random_sample = cytoolz.curry(cytoolz.random_sample)
reduce = cytoolz.curry(cytoolz.reduce)
reduceby = cytoolz.curry(cytoolz.reduceby)
remove = cytoolz.curry(cytoolz.remove)
sliding_window = cytoolz.curry(cytoolz.sliding_window)
sorted = cytoolz.curry(cytoolz.sorted)
tail = cytoolz.curry(cytoolz.tail)
take = cytoolz.curry(cytoolz.take)
take_nth = cytoolz.curry(cytoolz.take_nth)
topk = cytoolz.curry(cytoolz.topk)
unique = cytoolz.curry(cytoolz.unique)
update_in = cytoolz.curry(cytoolz.update_in)
valfilter = cytoolz.curry(cytoolz.valfilter)
valmap = cytoolz.curry(cytoolz.valmap)
del exceptions
del cytoolz
././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 011453 x ustar 00 0000000 0000000 22 mtime=1600891528.0
cytoolz-0.11.0/cytoolz/curried/exceptions.py 0000644 0000766 0000024 00000000536 00000000000 021567 0 ustar 00ewelch staff 0000000 0000000 import cytoolz
__all__ = ['merge', 'merge_with']
@cytoolz.curry
def merge(d, *dicts, **kwargs):
return cytoolz.merge(d, *dicts, **kwargs)
@cytoolz.curry
def merge_with(func, d, *dicts, **kwargs):
return cytoolz.merge_with(func, d, *dicts, **kwargs)
merge.__doc__ = cytoolz.merge.__doc__
merge_with.__doc__ = cytoolz.merge_with.__doc__
././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 011453 x ustar 00 0000000 0000000 22 mtime=1600891528.0
cytoolz-0.11.0/cytoolz/curried/operator.py 0000644 0000766 0000024 00000000766 00000000000 021246 0 ustar 00ewelch staff 0000000 0000000 from __future__ import absolute_import
import operator
from cytoolz.functoolz import curry, num_required_args, has_keywords
def should_curry(f):
num = num_required_args(f)
return num is None or num > 1 or num == 1 and has_keywords(f) is not False
locals().update(
dict((name, curry(f) if should_curry(f) else f)
for name, f in vars(operator).items() if callable(f)),
)
# Clean up the namespace.
del curry
del num_required_args
del has_keywords
del operator
del should_curry
././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 011453 x ustar 00 0000000 0000000 22 mtime=1600892189.0
cytoolz-0.11.0/cytoolz/dicttoolz.c 0000644 0000766 0000024 00001713703 00000000000 017566 0 ustar 00ewelch staff 0000000 0000000 /* Generated by Cython 0.29.21 */
/* BEGIN: Cython Metadata
{
"distutils": {
"depends": [],
"name": "cytoolz.dicttoolz",
"sources": [
"cytoolz/dicttoolz.pyx"
]
},
"module_name": "cytoolz.dicttoolz"
}
END: Cython Metadata */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
#error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29_21"
#define CYTHON_HEX_VERSION 0x001D15F0
#define CYTHON_FUTURE_DIVISION 0
#include
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
#ifndef __stdcall
#define __stdcall
#endif
#ifndef __cdecl
#define __cdecl
#endif
#ifndef __fastcall
#define __fastcall
#endif
#endif
#ifndef DL_IMPORT
#define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
#define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
#if PY_VERSION_HEX >= 0x02070000
#define HAVE_LONG_LONG
#endif
#endif
#ifndef PY_LONG_LONG
#define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
#define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_PYSTON 0
#define CYTHON_COMPILING_IN_CPYTHON 0
#undef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 0
#undef CYTHON_USE_PYTYPE_LOOKUP
#define CYTHON_USE_PYTYPE_LOOKUP 0
#if PY_VERSION_HEX < 0x03050000
#undef CYTHON_USE_ASYNC_SLOTS
#define CYTHON_USE_ASYNC_SLOTS 0
#elif !defined(CYTHON_USE_ASYNC_SLOTS)
#define CYTHON_USE_ASYNC_SLOTS 1
#endif
#undef CYTHON_USE_PYLIST_INTERNALS
#define CYTHON_USE_PYLIST_INTERNALS 0
#undef CYTHON_USE_UNICODE_INTERNALS
#define CYTHON_USE_UNICODE_INTERNALS 0
#undef CYTHON_USE_UNICODE_WRITER
#define CYTHON_USE_UNICODE_WRITER 0
#undef CYTHON_USE_PYLONG_INTERNALS
#define CYTHON_USE_PYLONG_INTERNALS 0
#undef CYTHON_AVOID_BORROWED_REFS
#define CYTHON_AVOID_BORROWED_REFS 1
#undef CYTHON_ASSUME_SAFE_MACROS
#define CYTHON_ASSUME_SAFE_MACROS 0
#undef CYTHON_UNPACK_METHODS
#define CYTHON_UNPACK_METHODS 0
#undef CYTHON_FAST_THREAD_STATE
#define CYTHON_FAST_THREAD_STATE 0
#undef CYTHON_FAST_PYCALL
#define CYTHON_FAST_PYCALL 0
#undef CYTHON_PEP489_MULTI_PHASE_INIT
#define CYTHON_PEP489_MULTI_PHASE_INIT 0
#undef CYTHON_USE_TP_FINALIZE
#define CYTHON_USE_TP_FINALIZE 0
#undef CYTHON_USE_DICT_VERSIONS
#define CYTHON_USE_DICT_VERSIONS 0
#undef CYTHON_USE_EXC_INFO_STACK
#define CYTHON_USE_EXC_INFO_STACK 0
#elif defined(PYSTON_VERSION)
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_PYSTON 1
#define CYTHON_COMPILING_IN_CPYTHON 0
#ifndef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 1
#endif
#undef CYTHON_USE_PYTYPE_LOOKUP
#define CYTHON_USE_PYTYPE_LOOKUP 0
#undef CYTHON_USE_ASYNC_SLOTS
#define CYTHON_USE_ASYNC_SLOTS 0
#undef CYTHON_USE_PYLIST_INTERNALS
#define CYTHON_USE_PYLIST_INTERNALS 0
#ifndef CYTHON_USE_UNICODE_INTERNALS
#define CYTHON_USE_UNICODE_INTERNALS 1
#endif
#undef CYTHON_USE_UNICODE_WRITER
#define CYTHON_USE_UNICODE_WRITER 0
#undef CYTHON_USE_PYLONG_INTERNALS
#define CYTHON_USE_PYLONG_INTERNALS 0
#ifndef CYTHON_AVOID_BORROWED_REFS
#define CYTHON_AVOID_BORROWED_REFS 0
#endif
#ifndef CYTHON_ASSUME_SAFE_MACROS
#define CYTHON_ASSUME_SAFE_MACROS 1
#endif
#ifndef CYTHON_UNPACK_METHODS
#define CYTHON_UNPACK_METHODS 1
#endif
#undef CYTHON_FAST_THREAD_STATE
#define CYTHON_FAST_THREAD_STATE 0
#undef CYTHON_FAST_PYCALL
#define CYTHON_FAST_PYCALL 0
#undef CYTHON_PEP489_MULTI_PHASE_INIT
#define CYTHON_PEP489_MULTI_PHASE_INIT 0
#undef CYTHON_USE_TP_FINALIZE
#define CYTHON_USE_TP_FINALIZE 0
#undef CYTHON_USE_DICT_VERSIONS
#define CYTHON_USE_DICT_VERSIONS 0
#undef CYTHON_USE_EXC_INFO_STACK
#define CYTHON_USE_EXC_INFO_STACK 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_PYSTON 0
#define CYTHON_COMPILING_IN_CPYTHON 1
#ifndef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 1
#endif
#if PY_VERSION_HEX < 0x02070000
#undef CYTHON_USE_PYTYPE_LOOKUP
#define CYTHON_USE_PYTYPE_LOOKUP 0
#elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
#define CYTHON_USE_PYTYPE_LOOKUP 1
#endif
#if PY_MAJOR_VERSION < 3
#undef CYTHON_USE_ASYNC_SLOTS
#define CYTHON_USE_ASYNC_SLOTS 0
#elif !defined(CYTHON_USE_ASYNC_SLOTS)
#define CYTHON_USE_ASYNC_SLOTS 1
#endif
#if PY_VERSION_HEX < 0x02070000
#undef CYTHON_USE_PYLONG_INTERNALS
#define CYTHON_USE_PYLONG_INTERNALS 0
#elif !defined(CYTHON_USE_PYLONG_INTERNALS)
#define CYTHON_USE_PYLONG_INTERNALS 1
#endif
#ifndef CYTHON_USE_PYLIST_INTERNALS
#define CYTHON_USE_PYLIST_INTERNALS 1
#endif
#ifndef CYTHON_USE_UNICODE_INTERNALS
#define CYTHON_USE_UNICODE_INTERNALS 1
#endif
#if PY_VERSION_HEX < 0x030300F0
#undef CYTHON_USE_UNICODE_WRITER
#define CYTHON_USE_UNICODE_WRITER 0
#elif !defined(CYTHON_USE_UNICODE_WRITER)
#define CYTHON_USE_UNICODE_WRITER 1
#endif
#ifndef CYTHON_AVOID_BORROWED_REFS
#define CYTHON_AVOID_BORROWED_REFS 0
#endif
#ifndef CYTHON_ASSUME_SAFE_MACROS
#define CYTHON_ASSUME_SAFE_MACROS 1
#endif
#ifndef CYTHON_UNPACK_METHODS
#define CYTHON_UNPACK_METHODS 1
#endif
#ifndef CYTHON_FAST_THREAD_STATE
#define CYTHON_FAST_THREAD_STATE 1
#endif
#ifndef CYTHON_FAST_PYCALL
#define CYTHON_FAST_PYCALL 1
#endif
#ifndef CYTHON_PEP489_MULTI_PHASE_INIT
#define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
#endif
#ifndef CYTHON_USE_TP_FINALIZE
#define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
#endif
#ifndef CYTHON_USE_DICT_VERSIONS
#define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
#endif
#ifndef CYTHON_USE_EXC_INFO_STACK
#define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
#endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
#include "longintrepr.h"
#undef SHIFT
#undef BASE
#undef MASK
#ifdef SIZEOF_VOID_P
enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
#endif
#endif
#ifndef __has_attribute
#define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
#define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
#if defined(__GNUC__)
#define CYTHON_RESTRICT __restrict__
#elif defined(_MSC_VER) && _MSC_VER >= 1400
#define CYTHON_RESTRICT __restrict
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define CYTHON_RESTRICT restrict
#else
#define CYTHON_RESTRICT
#endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
# define CYTHON_UNUSED __attribute__ ((__unused__))
# else
# define CYTHON_UNUSED
# endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
# define CYTHON_UNUSED __attribute__ ((__unused__))
# else
# define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
# if defined(__cplusplus)
template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
# else
# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
# endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
# define CYTHON_NCP_UNUSED
# else
# define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
#ifndef _MSC_STDINT_H_
#if _MSC_VER < 1300
typedef unsigned char uint8_t;
typedef unsigned int uint32_t;
#else
typedef unsigned __int8 uint8_t;
typedef unsigned __int32 uint32_t;
#endif
#endif
#else
#include
#endif
#ifndef CYTHON_FALLTHROUGH
#if defined(__cplusplus) && __cplusplus >= 201103L
#if __has_cpp_attribute(fallthrough)
#define CYTHON_FALLTHROUGH [[fallthrough]]
#elif __has_cpp_attribute(clang::fallthrough)
#define CYTHON_FALLTHROUGH [[clang::fallthrough]]
#elif __has_cpp_attribute(gnu::fallthrough)
#define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
#endif
#endif
#ifndef CYTHON_FALLTHROUGH
#if __has_attribute(fallthrough)
#define CYTHON_FALLTHROUGH __attribute__((fallthrough))
#else
#define CYTHON_FALLTHROUGH
#endif
#endif
#if defined(__clang__ ) && defined(__apple_build_version__)
#if __apple_build_version__ < 7000000
#undef CYTHON_FALLTHROUGH
#define CYTHON_FALLTHROUGH
#endif
#endif
#endif
#ifndef CYTHON_INLINE
#if defined(__clang__)
#define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
#elif defined(__GNUC__)
#define CYTHON_INLINE __inline__
#elif defined(_MSC_VER)
#define CYTHON_INLINE __inline
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define CYTHON_INLINE inline
#else
#define CYTHON_INLINE
#endif
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
#define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
#define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
#define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
#define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
#define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
#define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
#define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
#ifndef METH_FASTCALL
#define METH_FASTCALL 0x80
#endif
typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
Py_ssize_t nargs, PyObject *kwnames);
#else
#define __Pyx_PyCFunctionFast _PyCFunctionFast
#define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
#define PyObject_Malloc(s) PyMem_Malloc(s)
#define PyObject_Free(p) PyMem_Free(p)
#define PyObject_Realloc(p) PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
#define PyMem_RawMalloc(n) PyMem_Malloc(n)
#define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
#define PyMem_RawFree(p) PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
#define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
#define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
#define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
#define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
#define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
#define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
#define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
#define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
*key = PyThread_create_key();
return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
*key = Py_tss_NEEDS_INIT;
return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
PyThread_delete_key(*key);
*key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
return PyThread_get_key_value(*key);
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n) PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
#else
#define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
#define CYTHON_PEP393_ENABLED 1
#define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
0 : _PyUnicode_Ready((PyObject *)(op)))
#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
#define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
#define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
#define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
#define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
#define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
#define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
#if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
#endif
#else
#define CYTHON_PEP393_ENABLED 0
#define PyUnicode_1BYTE_KIND 1
#define PyUnicode_2BYTE_KIND 2
#define PyUnicode_4BYTE_KIND 4
#define __Pyx_PyUnicode_READY(op) (0)
#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
#define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
#define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
#define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
#define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
#define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
#define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
#else
#define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
#define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
#define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
#define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
#define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
#else
#define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
#define PyObject_ASCII(o) PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
#define PyBaseString_Type PyUnicode_Type
#define PyStringObject PyUnicodeObject
#define PyString_Type PyUnicode_Type
#define PyString_Check PyUnicode_Check
#define PyString_CheckExact PyUnicode_CheckExact
#ifndef PyObject_Unicode
#define PyObject_Unicode PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
#define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
#define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
#define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
#define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
#define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
#define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
#define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
#define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
#define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
#else
#define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
#define PyIntObject PyLongObject
#define PyInt_Type PyLong_Type
#define PyInt_Check(op) PyLong_Check(op)
#define PyInt_CheckExact(op) PyLong_CheckExact(op)
#define PyInt_FromString PyLong_FromString
#define PyInt_FromUnicode PyLong_FromUnicode
#define PyInt_FromLong PyLong_FromLong
#define PyInt_FromSize_t PyLong_FromSize_t
#define PyInt_FromSsize_t PyLong_FromSsize_t
#define PyInt_AsLong PyLong_AsLong
#define PyInt_AS_LONG PyLong_AS_LONG
#define PyInt_AsSsize_t PyLong_AsSsize_t
#define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
#define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
#define PyNumber_Int PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
#define PyBoolObject PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
#ifndef PyUnicode_InternFromString
#define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
#endif
#endif
#if PY_VERSION_HEX < 0x030200A4
typedef long Py_hash_t;
#define __Pyx_PyInt_FromHash_t PyInt_FromLong
#define __Pyx_PyInt_AsHash_t PyInt_AsLong
#else
#define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
#define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
#else
#define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
#if PY_VERSION_HEX >= 0x030500B1
#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
#define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
#else
#define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
#endif
#else
#define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
typedef struct {
unaryfunc am_await;
unaryfunc am_aiter;
unaryfunc am_anext;
} __Pyx_PyAsyncMethodsStruct;
#endif
#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
float value;
memset(&value, 0xFF, sizeof(value));
return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif
#define __PYX_MARK_ERR_POS(f_index, lineno) \
{ __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
{ __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
#ifndef __PYX_EXTERN_C
#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
#define __PYX_EXTERN_C extern
#endif
#endif
#define __PYX_HAVE__cytoolz__dicttoolz
#define __PYX_HAVE_API__cytoolz__dicttoolz
/* Early includes */
#include
#include
#ifdef _OPENMP
#include
#endif /* _OPENMP */
#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif
typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
(sizeof(type) < sizeof(Py_ssize_t)) ||\
(sizeof(type) > sizeof(Py_ssize_t) &&\
likely(v < (type)PY_SSIZE_T_MAX ||\
v == (type)PY_SSIZE_T_MAX) &&\
(!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
v == (type)PY_SSIZE_T_MIN))) ||\
(sizeof(type) == sizeof(Py_ssize_t) &&\
(is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
v == (type)PY_SSIZE_T_MAX))) )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
#include
#define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
#define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
#define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
#define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
#define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
#define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
#define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
#define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
#define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
const Py_UNICODE *u_end = u;
while (*u_end++) ;
return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
(likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
PyObject* sys;
PyObject* default_encoding = NULL;
PyObject* ascii_chars_u = NULL;
PyObject* ascii_chars_b = NULL;
const char* default_encoding_c;
sys = PyImport_ImportModule("sys");
if (!sys) goto bad;
default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
Py_DECREF(sys);
if (!default_encoding) goto bad;
default_encoding_c = PyBytes_AsString(default_encoding);
if (!default_encoding_c) goto bad;
if (strcmp(default_encoding_c, "ascii") == 0) {
__Pyx_sys_getdefaultencoding_not_ascii = 0;
} else {
char ascii_chars[128];
int c;
for (c = 0; c < 128; c++) {
ascii_chars[c] = c;
}
__Pyx_sys_getdefaultencoding_not_ascii = 1;
ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
if (!ascii_chars_u) goto bad;
ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
PyErr_Format(
PyExc_ValueError,
"This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
default_encoding_c);
goto bad;
}
Py_DECREF(ascii_chars_u);
Py_DECREF(ascii_chars_b);
}
Py_DECREF(default_encoding);
return 0;
bad:
Py_XDECREF(default_encoding);
Py_XDECREF(ascii_chars_u);
Py_XDECREF(ascii_chars_b);
return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
PyObject* sys;
PyObject* default_encoding = NULL;
char* default_encoding_c;
sys = PyImport_ImportModule("sys");
if (!sys) goto bad;
default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
Py_DECREF(sys);
if (!default_encoding) goto bad;
default_encoding_c = PyBytes_AsString(default_encoding);
if (!default_encoding_c) goto bad;
__PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
Py_DECREF(default_encoding);
return 0;
bad:
Py_XDECREF(default_encoding);
return -1;
}
#endif
#endif
/* Test for GCC > 2.95 */
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
#define likely(x) (x)
#define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;
static const char *__pyx_f[] = {
"cytoolz/dicttoolz.pyx",
"stringsource",
"type.pxd",
};
/*--- Type declarations ---*/
struct __pyx_obj_7cytoolz_9dicttoolz__iter_mapping;
struct __pyx_opt_args_7cytoolz_9dicttoolz_c_merge;
struct __pyx_opt_args_7cytoolz_9dicttoolz_c_merge_with;
struct __pyx_opt_args_7cytoolz_9dicttoolz_valmap;
struct __pyx_opt_args_7cytoolz_9dicttoolz_keymap;
struct __pyx_opt_args_7cytoolz_9dicttoolz_itemmap;
struct __pyx_opt_args_7cytoolz_9dicttoolz_valfilter;
struct __pyx_opt_args_7cytoolz_9dicttoolz_keyfilter;
struct __pyx_opt_args_7cytoolz_9dicttoolz_itemfilter;
struct __pyx_opt_args_7cytoolz_9dicttoolz_assoc;
struct __pyx_opt_args_7cytoolz_9dicttoolz_assoc_in;
struct __pyx_opt_args_7cytoolz_9dicttoolz_c_dissoc;
struct __pyx_opt_args_7cytoolz_9dicttoolz_update_in;
struct __pyx_opt_args_7cytoolz_9dicttoolz_get_in;
/* "cytoolz/dicttoolz.pxd":8
* cdef object cur
*
* ctypedef int (*f_map_next)(object p, Py_ssize_t *ppos, PyObject* *pkey, PyObject* *pval) except -1 # <<<<<<<<<<<<<<
*
* cdef f_map_next get_map_iter(object d, PyObject* *ptr) except NULL
*/
typedef int (*__pyx_t_7cytoolz_9dicttoolz_f_map_next)(PyObject *, Py_ssize_t *, PyObject **, PyObject **);
/* "cytoolz/dicttoolz.pxd":15
*
*
* cdef object c_merge(object dicts, object factory=*) # <<<<<<<<<<<<<<
*
*
*/
struct __pyx_opt_args_7cytoolz_9dicttoolz_c_merge {
int __pyx_n;
PyObject *factory;
};
/* "cytoolz/dicttoolz.pxd":18
*
*
* cdef object c_merge_with(object func, object dicts, object factory=*) # <<<<<<<<<<<<<<
*
*
*/
struct __pyx_opt_args_7cytoolz_9dicttoolz_c_merge_with {
int __pyx_n;
PyObject *factory;
};
/* "cytoolz/dicttoolz.pxd":21
*
*
* cpdef object valmap(object func, object d, object factory=*) # <<<<<<<<<<<<<<
*
*
*/
struct __pyx_opt_args_7cytoolz_9dicttoolz_valmap {
int __pyx_n;
PyObject *factory;
};
/* "cytoolz/dicttoolz.pxd":24
*
*
* cpdef object keymap(object func, object d, object factory=*) # <<<<<<<<<<<<<<
*
*
*/
struct __pyx_opt_args_7cytoolz_9dicttoolz_keymap {
int __pyx_n;
PyObject *factory;
};
/* "cytoolz/dicttoolz.pxd":27
*
*
* cpdef object itemmap(object func, object d, object factory=*) # <<<<<<<<<<<<<<
*
*
*/
struct __pyx_opt_args_7cytoolz_9dicttoolz_itemmap {
int __pyx_n;
PyObject *factory;
};
/* "cytoolz/dicttoolz.pxd":30
*
*
* cpdef object valfilter(object predicate, object d, object factory=*) # <<<<<<<<<<<<<<
*
*
*/
struct __pyx_opt_args_7cytoolz_9dicttoolz_valfilter {
int __pyx_n;
PyObject *factory;
};
/* "cytoolz/dicttoolz.pxd":33
*
*
* cpdef object keyfilter(object predicate, object d, object factory=*) # <<<<<<<<<<<<<<
*
*
*/
struct __pyx_opt_args_7cytoolz_9dicttoolz_keyfilter {
int __pyx_n;
PyObject *factory;
};
/* "cytoolz/dicttoolz.pxd":36
*
*
* cpdef object itemfilter(object predicate, object d, object factory=*) # <<<<<<<<<<<<<<
*
*
*/
struct __pyx_opt_args_7cytoolz_9dicttoolz_itemfilter {
int __pyx_n;
PyObject *factory;
};
/* "cytoolz/dicttoolz.pxd":39
*
*
* cpdef object assoc(object d, object key, object value, object factory=*) # <<<<<<<<<<<<<<
*
*
*/
struct __pyx_opt_args_7cytoolz_9dicttoolz_assoc {
int __pyx_n;
PyObject *factory;
};
/* "cytoolz/dicttoolz.pxd":42
*
*
* cpdef object assoc_in(object d, object keys, object value, object factory=*) # <<<<<<<<<<<<<<
*
*
*/
struct __pyx_opt_args_7cytoolz_9dicttoolz_assoc_in {
int __pyx_n;
PyObject *factory;
};
/* "cytoolz/dicttoolz.pxd":45
*
*
* cdef object c_dissoc(object d, object keys, object factory=*) # <<<<<<<<<<<<<<
*
*
*/
struct __pyx_opt_args_7cytoolz_9dicttoolz_c_dissoc {
int __pyx_n;
PyObject *factory;
};
/* "cytoolz/dicttoolz.pxd":48
*
*
* cpdef object update_in(object d, object keys, object func, object default=*, object factory=*) # <<<<<<<<<<<<<<
*
*
*/
struct __pyx_opt_args_7cytoolz_9dicttoolz_update_in {
int __pyx_n;
PyObject *__pyx_default;
PyObject *factory;
};
/* "cytoolz/dicttoolz.pxd":51
*
*
* cpdef object get_in(object keys, object coll, object default=*, object no_default=*) # <<<<<<<<<<<<<<
*/
struct __pyx_opt_args_7cytoolz_9dicttoolz_get_in {
int __pyx_n;
PyObject *__pyx_default;
PyObject *no_default;
};
/* "cytoolz/dicttoolz.pxd":4
*
* # utility functions to perform iteration over dicts or generic mapping
* cdef class _iter_mapping: # <<<<<<<<<<<<<<
* cdef object it
* cdef object cur
*/
struct __pyx_obj_7cytoolz_9dicttoolz__iter_mapping {
PyObject_HEAD
PyObject *it;
PyObject *cur;
};
/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
#define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
typedef struct {
void (*INCREF)(void*, PyObject*, int);
void (*DECREF)(void*, PyObject*, int);
void (*GOTREF)(void*, PyObject*, int);
void (*GIVEREF)(void*, PyObject*, int);
void* (*SetupContext)(const char*, int, const char*);
void (*FinishContext)(void**);
} __Pyx_RefNannyAPIStruct;
static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
#define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
#define __Pyx_RefNannySetupContext(name, acquire_gil)\
if (acquire_gil) {\
PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
PyGILState_Release(__pyx_gilstate_save);\
} else {\
__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
}
#else
#define __Pyx_RefNannySetupContext(name, acquire_gil)\
__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
#define __Pyx_RefNannyFinishContext()\
__Pyx_RefNanny->FinishContext(&__pyx_refnanny)
#define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
#define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
#define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
#define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
#define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
#define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
#define __Pyx_RefNannyDeclarations
#define __Pyx_RefNannySetupContext(name, acquire_gil)
#define __Pyx_RefNannyFinishContext()
#define __Pyx_INCREF(r) Py_INCREF(r)
#define __Pyx_DECREF(r) Py_DECREF(r)
#define __Pyx_GOTREF(r)
#define __Pyx_GIVEREF(r)
#define __Pyx_XINCREF(r) Py_XINCREF(r)
#define __Pyx_XDECREF(r) Py_XDECREF(r)
#define __Pyx_XGOTREF(r)
#define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {\
PyObject *tmp = (PyObject *) r;\
r = v; __Pyx_XDECREF(tmp);\
} while (0)
#define __Pyx_DECREF_SET(r, v) do {\
PyObject *tmp = (PyObject *) r;\
r = v; __Pyx_DECREF(tmp);\
} while (0)
#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif
/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);
/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
const char* function_name);
/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred() PyErr_Occurred()
#endif
/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
#endif
/* IterNext.proto */
#define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL)
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *);
/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif
/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
(__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
__Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
(is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
__Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
(__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
__Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
(PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
(__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
__Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
(PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
int is_list, int wraparound, int boundscheck);
/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
__Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
(sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
static size_t __pyx_pyframe_localsplus_offset = 0;
#include "frameobject.h"
#define __Pxy_PyFrame_Initialize_Offsets()\
((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
(void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
#define __Pyx_PyFrame_GetLocalsplus(frame)\
(assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif
/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif
/* PyObjectCallNoArg.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif
/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
#endif
/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
/* PyObjectCall2Args.proto */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
/* KeywordStringCheck.proto */
static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
(version_var) = __PYX_GET_DICT_VERSION(dict);\
(cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
static PY_UINT64_T __pyx_dict_version = 0;\
static PyObject *__pyx_dict_cached_value = NULL;\
if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
(VAR) = __pyx_dict_cached_value;\
} else {\
(VAR) = __pyx_dict_cached_value = (LOOKUP);\
__pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
}\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict) (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
#endif
/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name) {\
static PY_UINT64_T __pyx_dict_version = 0;\
static PyObject *__pyx_dict_cached_value = NULL;\
(var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
(likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
__Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
#define __Pyx_GetModuleGlobalNameUncached(var, name) {\
PY_UINT64_T __pyx_dict_version;\
PyObject *__pyx_dict_cached_value;\
(var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif
/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);
/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
/* SliceObject.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
int has_cstart, int has_cstop, int wraparound);
/* PySequenceContains.proto */
static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
int result = PySequence_Contains(seq, item);
return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}
/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
#else
#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
#endif
/* UnpackUnboundCMethod.proto */
typedef struct {
PyObject *type;
PyObject **method_name;
PyCFunction func;
PyObject *method;
int flag;
} __Pyx_CachedCFunction;
/* CallUnboundCMethod1.proto */
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#else
#define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg)
#endif
/* set_iter.proto */
static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set,
Py_ssize_t* p_orig_length, int* p_source_is_set);
static CYTHON_INLINE int __Pyx_set_iter_next(
PyObject* iter_obj, Py_ssize_t orig_length,
Py_ssize_t* ppos, PyObject **value,
int source_is_set);
/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif
/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
#endif
/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
#endif
/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif
/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif
/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif
/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);
/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto
#define __PYX_HAVE_RT_ImportType_proto
enum __Pyx_ImportType_CheckSize {
__Pyx_ImportType_CheckSize_Error = 0,
__Pyx_ImportType_CheckSize_Warn = 1,
__Pyx_ImportType_CheckSize_Ignore = 2
};
static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
#endif
/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
/* FetchCommonType.proto */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
/* CythonFunctionShared.proto */
#define __Pyx_CyFunction_USED 1
#define __Pyx_CYFUNCTION_STATICMETHOD 0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
#define __Pyx_CYFUNCTION_CCLASS 0x04
#define __Pyx_CyFunction_GetClosure(f)\
(((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f)\
(((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f)\
((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
PyCFunctionObject func;
#if PY_VERSION_HEX < 0x030500A0
PyObject *func_weakreflist;
#endif
PyObject *func_dict;
PyObject *func_name;
PyObject *func_qualname;
PyObject *func_doc;
PyObject *func_globals;
PyObject *func_code;
PyObject *func_closure;
PyObject *func_classobj;
void *defaults;
int defaults_pyobjects;
size_t defaults_size; // used by FusedFunction for copying defaults
int flags;
PyObject *defaults_tuple;
PyObject *defaults_kwdict;
PyObject *(*defaults_getter)(PyObject *);
PyObject *func_annotations;
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
int flags, PyObject* qualname,
PyObject *self,
PyObject *module, PyObject *globals,
PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
size_t size,
int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
PyObject *dict);
static int __pyx_CyFunction_init(void);
/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
int flags, PyObject* qualname,
PyObject *closure,
PyObject *module, PyObject *globals,
PyObject* code);
/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif
/* CodeObjectCache.proto */
typedef struct {
PyCodeObject* code_object;
int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
int count;
int max_count;
__Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
int py_line, const char *filename);
/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);
/* FunctionExport.proto */
static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig);
/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
/* Module declarations from 'libc.string' */
/* Module declarations from 'libc.stdio' */
/* Module declarations from '__builtin__' */
/* Module declarations from 'cpython.type' */
static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
/* Module declarations from 'cpython' */
/* Module declarations from 'cpython.object' */
/* Module declarations from 'cpython.ref' */
/* Module declarations from 'cpython.dict' */
/* Module declarations from 'cpython.list' */
/* Module declarations from 'cytoolz.cpython' */
/* Module declarations from 'cytoolz.dicttoolz' */
static PyTypeObject *__pyx_ptype_7cytoolz_9dicttoolz__iter_mapping = 0;
static PyObject *__pyx_v_7cytoolz_9dicttoolz__get_in_exceptions = 0;
static __pyx_t_7cytoolz_9dicttoolz_f_map_next __pyx_f_7cytoolz_9dicttoolz_get_map_iter(PyObject *, PyObject **); /*proto*/
static int __pyx_f_7cytoolz_9dicttoolz_PyMapping_Next(PyObject *, Py_ssize_t *, PyObject **, PyObject **); /*proto*/
static PyObject *__pyx_f_7cytoolz_9dicttoolz_c_merge(PyObject *, struct __pyx_opt_args_7cytoolz_9dicttoolz_c_merge *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9dicttoolz_c_merge_with(PyObject *, PyObject *, struct __pyx_opt_args_7cytoolz_9dicttoolz_c_merge_with *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9dicttoolz_valmap(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9dicttoolz_valmap *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9dicttoolz_keymap(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9dicttoolz_keymap *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9dicttoolz_itemmap(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9dicttoolz_itemmap *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9dicttoolz_valfilter(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9dicttoolz_valfilter *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9dicttoolz_keyfilter(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9dicttoolz_keyfilter *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9dicttoolz_itemfilter(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9dicttoolz_itemfilter *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9dicttoolz_assoc(PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9dicttoolz_assoc *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9dicttoolz_assoc_in(PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9dicttoolz_assoc_in *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9dicttoolz_c_dissoc(PyObject *, PyObject *, struct __pyx_opt_args_7cytoolz_9dicttoolz_c_dissoc *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9dicttoolz_update_in(PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9dicttoolz_update_in *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9dicttoolz_get_in(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9dicttoolz_get_in *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9dicttoolz_get_factory(PyObject *, PyObject *); /*proto*/
#define __Pyx_MODULE_NAME "cytoolz.dicttoolz"
extern int __pyx_module_is_main_cytoolz__dicttoolz;
int __pyx_module_is_main_cytoolz__dicttoolz = 0;
/* Implementation of 'cytoolz.dicttoolz' */
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_builtin_TypeError;
static const char __pyx_k_d[] = "d";
static const char __pyx_k_it[] = "it";
static const char __pyx_k_all[] = "__all__";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_pop[] = "pop";
static const char __pyx_k_coll[] = "coll";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_func[] = "func";
static const char __pyx_k_keys[] = "keys";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_assoc[] = "assoc";
static const char __pyx_k_dicts[] = "dicts";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_merge[] = "merge";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_dissoc[] = "dissoc";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_get_in[] = "get_in";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_keymap[] = "keymap";
static const char __pyx_k_kwargs[] = "kwargs";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_valmap[] = "valmap";
static const char __pyx_k_Mapping[] = "Mapping";
static const char __pyx_k_default[] = "default";
static const char __pyx_k_factory[] = "factory";
static const char __pyx_k_itemmap[] = "itemmap";
static const char __pyx_k_popitem[] = "popitem";
static const char __pyx_k_KeyError[] = "KeyError";
static const char __pyx_k_assoc_in[] = "assoc_in";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_iteritems[] = "iteritems";
static const char __pyx_k_keyfilter[] = "keyfilter";
static const char __pyx_k_predicate[] = "predicate";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_update_in[] = "update_in";
static const char __pyx_k_valfilter[] = "valfilter";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_itemfilter[] = "itemfilter";
static const char __pyx_k_merge_with[] = "merge_with";
static const char __pyx_k_no_default[] = "no_default";
static const char __pyx_k_iter_mapping[] = "_iter_mapping";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_assoc_line_370[] = "assoc (line 370)";
static const char __pyx_k_merge_line_101[] = "merge (line 101)";
static const char __pyx_k_collections_abc[] = "collections.abc";
static const char __pyx_k_dissoc_line_450[] = "dissoc (line 450)";
static const char __pyx_k_get_in_line_538[] = "get_in (line 538)";
static const char __pyx_k_keymap_line_210[] = "keymap (line 210)";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_valmap_line_181[] = "valmap (line 181)";
static const char __pyx_k_itemmap_line_239[] = "itemmap (line 239)";
static const char __pyx_k_assoc_in_line_391[] = "assoc_in (line 391)";
static const char __pyx_k_cytoolz_dicttoolz[] = "cytoolz.dicttoolz";
static const char __pyx_k_difference_update[] = "difference_update";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_keyfilter_line_301[] = "keyfilter (line 301)";
static const char __pyx_k_update_in_line_467[] = "update_in (line 467)";
static const char __pyx_k_valfilter_line_269[] = "valfilter (line 269)";
static const char __pyx_k_itemfilter_line_333[] = "itemfilter (line 333)";
static const char __pyx_k_merge_with_line_158[] = "merge_with (line 158)";
static const char __pyx_k_cytoolz_dicttoolz_pyx[] = "cytoolz/dicttoolz.pyx";
static const char __pyx_k_iter_mapping___reduce_cython[] = "_iter_mapping.__reduce_cython__";
static const char __pyx_k_Return_a_new_dict_with_new_key[] = "\n Return a new dict with new key value pair\n\n New dict has d[key] set to value. Does not modify the initial dictionary.\n\n >>> assoc({'x': 1}, 'x', 2)\n {'x': 2}\n >>> assoc({'x': 1}, 'y', 3) # doctest: +SKIP\n {'x': 1, 'y': 3}\n ";
static const char __pyx_k_Returns_coll_i0_i1_iX_where_i0[] = "\n Returns coll[i0][i1]...[iX] where [i0, i1, ..., iX]==keys.\n\n If coll[i0][i1]...[iX] cannot be found, returns ``default``, unless\n ``no_default`` is specified, then it raises KeyError or IndexError.\n\n ``get_in`` is a generalization of ``operator.getitem`` for nested data\n structures such as dictionaries and lists.\n\n >>> transaction = {'name': 'Alice',\n ... 'purchase': {'items': ['Apple', 'Orange'],\n ... 'costs': [0.50, 1.25]},\n ... 'credit card': '5555-1234-1234-1234'}\n >>> get_in(['purchase', 'items', 0], transaction)\n 'Apple'\n >>> get_in(['name'], transaction)\n 'Alice'\n >>> get_in(['purchase', 'total'], transaction)\n >>> get_in(['purchase', 'items', 'apple'], transaction)\n >>> get_in(['purchase', 'items', 10], transaction)\n >>> get_in(['purchase', 'total'], transaction, 0)\n 0\n >>> get_in(['y'], {}, no_default=True)\n Traceback (most recent call last):\n ...\n KeyError: 'y'\n\n See Also:\n itertoolz.get\n operator.getitem\n ";
static const char __pyx_k_iter_mapping___setstate_cython[] = "_iter_mapping.__setstate_cython__";
static const char __pyx_k_0_got_an_unexpected_keyword_arg[] = "{0}() got an unexpected keyword argument '{1}'";
static const char __pyx_k_Apply_function_to_items_of_dict[] = "\n Apply function to items of dictionary\n\n >>> accountids = {\"Alice\": 10, \"Bob\": 20}\n >>> itemmap(reversed, accountids) # doctest: +SKIP\n {10: \"Alice\", 20: \"Bob\"}\n\n See Also:\n keymap\n valmap\n ";
static const char __pyx_k_Apply_function_to_keys_of_dicti[] = "\n Apply function to keys of dictionary\n\n >>> bills = {\"Alice\": [20, 15, 30], \"Bob\": [10, 35]}\n >>> keymap(str.lower, bills) # doctest: +SKIP\n {'alice': [20, 15, 30], 'bob': [10, 35]}\n\n See Also:\n valmap\n itemmap\n ";
static const char __pyx_k_Apply_function_to_values_of_dic[] = "\n Apply function to values of dictionary\n\n >>> bills = {\"Alice\": [20, 15, 30], \"Bob\": [10, 35]}\n >>> valmap(sum, bills) # doctest: +SKIP\n {'Alice': 65, 'Bob': 45}\n\n See Also:\n keymap\n itemmap\n ";
static const char __pyx_k_Filter_items_in_dictionary_by_i[] = "\n Filter items in dictionary by item\n\n >>> def isvalid(item):\n ... k, v = item\n ... return k % 2 == 0 and v < 4\n\n >>> d = {1: 2, 2: 3, 3: 4, 4: 5}\n >>> itemfilter(isvalid, d)\n {2: 3}\n\n See Also:\n keyfilter\n valfilter\n itemmap\n ";
static const char __pyx_k_Filter_items_in_dictionary_by_k[] = "\n Filter items in dictionary by key\n\n >>> iseven = lambda x: x % 2 == 0\n >>> d = {1: 2, 2: 3, 3: 4, 4: 5}\n >>> keyfilter(iseven, d)\n {2: 3, 4: 5}\n\n See Also:\n valfilter\n itemfilter\n keymap\n ";
static const char __pyx_k_Filter_items_in_dictionary_by_v[] = "\n Filter items in dictionary by value\n\n >>> iseven = lambda x: x % 2 == 0\n >>> d = {1: 2, 2: 3, 3: 4, 4: 5}\n >>> valfilter(iseven, d)\n {1: 2, 3: 4}\n\n See Also:\n keyfilter\n itemfilter\n valmap\n ";
static const char __pyx_k_Merge_a_collection_of_dictionar[] = "\n Merge a collection of dictionaries\n\n >>> merge({1: 'one'}, {2: 'two'})\n {1: 'one', 2: 'two'}\n\n Later dictionaries have precedence\n\n >>> merge({1: 2, 3: 4}, {3: 3, 4: 4})\n {1: 2, 3: 3, 4: 4}\n\n See Also:\n merge_with\n ";
static const char __pyx_k_Merge_dictionaries_and_apply_fu[] = "\n Merge dictionaries and apply function to combined values\n\n A key may occur in more than one dict, and all values mapped from the key\n will be passed to the function as a list, such as func([val1, val2, ...]).\n\n >>> merge_with(sum, {1: 1, 2: 2}, {1: 10, 2: 20})\n {1: 11, 2: 22}\n\n >>> merge_with(first, {1: 1, 2: 2}, {2: 20, 3: 30}) # doctest: +SKIP\n {1: 1, 2: 2, 3: 30}\n\n See Also:\n merge\n ";
static const char __pyx_k_Return_a_new_dict_with_new_pote[] = "\n Return a new dict with new, potentially nested, key value pair\n\n >>> purchase = {'name': 'Alice',\n ... 'order': {'items': ['Apple', 'Orange'],\n ... 'costs': [0.50, 1.25]},\n ... 'credit card': '5555-1234-1234-1234'}\n >>> assoc_in(purchase, ['order', 'costs'], [0.25, 1.00]) # doctest: +SKIP\n {'credit card': '5555-1234-1234-1234',\n 'name': 'Alice',\n 'order': {'costs': [0.25, 1.00], 'items': ['Apple', 'Orange']}}\n ";
static const char __pyx_k_Return_a_new_dict_with_the_give[] = "\n Return a new dict with the given key(s) removed.\n\n New dict has d[key] deleted for each supplied key.\n Does not modify the initial dictionary.\n\n >>> dissoc({'x': 1, 'y': 2}, 'y')\n {'x': 1}\n >>> dissoc({'x': 1, 'y': 2}, 'y', 'x')\n {}\n >>> dissoc({'x': 1}, 'y') # Ignores missing keys\n {'x': 1}\n ";
static const char __pyx_k_Update_value_in_a_potentially_n[] = "\n Update value in a (potentially) nested dictionary\n\n inputs:\n d - dictionary on which to operate\n keys - list or tuple giving the location of the value to be changed in d\n func - function to operate on that value\n\n If keys == [k0,..,kX] and d[k0]..[kX] == v, update_in returns a copy of the\n original dictionary with v replaced by func(v), but does not mutate the\n original dictionary.\n\n If k0 is not a key in d, update_in creates nested dictionaries to the depth\n specified by the keys, with the innermost value set to func(default).\n\n >>> inc = lambda x: x + 1\n >>> update_in({'a': 0}, ['a'], inc)\n {'a': 1}\n\n >>> transaction = {'name': 'Alice',\n ... 'purchase': {'items': ['Apple', 'Orange'],\n ... 'costs': [0.50, 1.25]},\n ... 'credit card': '5555-1234-1234-1234'}\n >>> update_in(transaction, ['purchase', 'costs'], sum) # doctest: +SKIP\n {'credit card': '5555-1234-1234-1234',\n 'name': 'Alice',\n 'purchase': {'costs': 1.75, 'items': ['Apple', 'Orange']}}\n\n >>> # updating a value when k0 is not in d\n >>> update_in({}, [1, 2, 3], str, default=\"bar\")\n {1: {2: {3: 'bar'}}}\n >>> update_in({1: 'foo'}, [2, 3, 4], inc, 0)\n {1: 'foo', 2: {3: {4: 1}}}\n ";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static PyObject *__pyx_kp_s_0_got_an_unexpected_keyword_arg;
static PyObject *__pyx_kp_u_Apply_function_to_items_of_dict;
static PyObject *__pyx_kp_u_Apply_function_to_keys_of_dicti;
static PyObject *__pyx_kp_u_Apply_function_to_values_of_dic;
static PyObject *__pyx_kp_u_Filter_items_in_dictionary_by_i;
static PyObject *__pyx_kp_u_Filter_items_in_dictionary_by_k;
static PyObject *__pyx_kp_u_Filter_items_in_dictionary_by_v;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_n_s_KeyError;
static PyObject *__pyx_n_s_Mapping;
static PyObject *__pyx_kp_u_Merge_a_collection_of_dictionar;
static PyObject *__pyx_kp_u_Merge_dictionaries_and_apply_fu;
static PyObject *__pyx_kp_u_Return_a_new_dict_with_new_key;
static PyObject *__pyx_kp_u_Return_a_new_dict_with_new_pote;
static PyObject *__pyx_kp_u_Return_a_new_dict_with_the_give;
static PyObject *__pyx_kp_u_Returns_coll_i0_i1_iX_where_i0;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_kp_u_Update_value_in_a_potentially_n;
static PyObject *__pyx_n_s_all;
static PyObject *__pyx_n_s_assoc;
static PyObject *__pyx_n_s_assoc_in;
static PyObject *__pyx_kp_u_assoc_in_line_391;
static PyObject *__pyx_kp_u_assoc_line_370;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_coll;
static PyObject *__pyx_n_s_collections_abc;
static PyObject *__pyx_n_s_copy;
static PyObject *__pyx_n_s_cytoolz_dicttoolz;
static PyObject *__pyx_kp_s_cytoolz_dicttoolz_pyx;
static PyObject *__pyx_n_s_d;
static PyObject *__pyx_n_s_default;
static PyObject *__pyx_n_s_dicts;
static PyObject *__pyx_n_s_difference_update;
static PyObject *__pyx_n_s_dissoc;
static PyObject *__pyx_kp_u_dissoc_line_450;
static PyObject *__pyx_n_s_factory;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_func;
static PyObject *__pyx_n_s_get_in;
static PyObject *__pyx_kp_u_get_in_line_538;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_it;
static PyObject *__pyx_n_s_itemfilter;
static PyObject *__pyx_kp_u_itemfilter_line_333;
static PyObject *__pyx_n_s_itemmap;
static PyObject *__pyx_kp_u_itemmap_line_239;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_iter_mapping;
static PyObject *__pyx_n_s_iter_mapping___reduce_cython;
static PyObject *__pyx_n_s_iter_mapping___setstate_cython;
static PyObject *__pyx_n_s_iteritems;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_keyfilter;
static PyObject *__pyx_kp_u_keyfilter_line_301;
static PyObject *__pyx_n_s_keymap;
static PyObject *__pyx_kp_u_keymap_line_210;
static PyObject *__pyx_n_s_keys;
static PyObject *__pyx_n_s_kwargs;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_merge;
static PyObject *__pyx_kp_u_merge_line_101;
static PyObject *__pyx_n_s_merge_with;
static PyObject *__pyx_kp_u_merge_with_line_158;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_no_default;
static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
static PyObject *__pyx_n_s_pop;
static PyObject *__pyx_n_s_popitem;
static PyObject *__pyx_n_s_predicate;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_update_in;
static PyObject *__pyx_kp_u_update_in_line_467;
static PyObject *__pyx_n_s_valfilter;
static PyObject *__pyx_kp_u_valfilter_line_269;
static PyObject *__pyx_n_s_valmap;
static PyObject *__pyx_kp_u_valmap_line_181;
static PyObject *__pyx_n_s_value;
static int __pyx_pf_7cytoolz_9dicttoolz_13_iter_mapping___cinit__(struct __pyx_obj_7cytoolz_9dicttoolz__iter_mapping *__pyx_v_self, PyObject *__pyx_v_it); /* proto */
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_13_iter_mapping_2__iter__(struct __pyx_obj_7cytoolz_9dicttoolz__iter_mapping *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_13_iter_mapping_4__next__(struct __pyx_obj_7cytoolz_9dicttoolz__iter_mapping *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_13_iter_mapping_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9dicttoolz__iter_mapping *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_13_iter_mapping_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9dicttoolz__iter_mapping *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_merge(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dicts, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_2merge_with(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, PyObject *__pyx_v_dicts, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_4valmap(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, PyObject *__pyx_v_d, PyObject *__pyx_v_factory); /* proto */
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_6keymap(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, PyObject *__pyx_v_d, PyObject *__pyx_v_factory); /* proto */
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_8itemmap(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, PyObject *__pyx_v_d, PyObject *__pyx_v_factory); /* proto */
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_10valfilter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_predicate, PyObject *__pyx_v_d, PyObject *__pyx_v_factory); /* proto */
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_12keyfilter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_predicate, PyObject *__pyx_v_d, PyObject *__pyx_v_factory); /* proto */
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_14itemfilter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_predicate, PyObject *__pyx_v_d, PyObject *__pyx_v_factory); /* proto */
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_16assoc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_d, PyObject *__pyx_v_key, PyObject *__pyx_v_value, PyObject *__pyx_v_factory); /* proto */
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_18assoc_in(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_d, PyObject *__pyx_v_keys, PyObject *__pyx_v_value, PyObject *__pyx_v_factory); /* proto */
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_20dissoc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_d, PyObject *__pyx_v_keys, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_22update_in(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_d, PyObject *__pyx_v_keys, PyObject *__pyx_v_func, PyObject *__pyx_v_default, PyObject *__pyx_v_factory); /* proto */
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_24get_in(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_keys, PyObject *__pyx_v_coll, PyObject *__pyx_v_default, PyObject *__pyx_v_no_default); /* proto */
static PyObject *__pyx_tp_new_7cytoolz_9dicttoolz__iter_mapping(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PySet_Type_difference_update = {0, &__pyx_n_s_difference_update, 0, 0, 0};
static PyObject *__pyx_int_1;
static PyObject *__pyx_k__3;
static PyObject *__pyx_k__4;
static PyObject *__pyx_k__5;
static PyObject *__pyx_k__6;
static PyObject *__pyx_k__7;
static PyObject *__pyx_k__8;
static PyObject *__pyx_k__9;
static PyObject *__pyx_k__10;
static PyObject *__pyx_k__11;
static PyObject *__pyx_k__12;
static PyObject *__pyx_k__14;
static PyObject *__pyx_k__15;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_slice__13;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_codeobj__17;
static PyObject *__pyx_codeobj__19;
static PyObject *__pyx_codeobj__21;
static PyObject *__pyx_codeobj__23;
static PyObject *__pyx_codeobj__25;
static PyObject *__pyx_codeobj__27;
static PyObject *__pyx_codeobj__29;
static PyObject *__pyx_codeobj__31;
static PyObject *__pyx_codeobj__33;
static PyObject *__pyx_codeobj__35;
static PyObject *__pyx_codeobj__37;
static PyObject *__pyx_codeobj__39;
static PyObject *__pyx_codeobj__41;
static PyObject *__pyx_codeobj__43;
static PyObject *__pyx_codeobj__46;
/* Late includes */
/* "cytoolz/dicttoolz.pyx":22
* cdef class _iter_mapping:
* """ Keep a handle on the current item to prevent memory clean up too early"""
* def __cinit__(self, object it): # <<<<<<<<<<<<<<
* self.it = it
* self.cur = None
*/
/* Python wrapper */
static int __pyx_pw_7cytoolz_9dicttoolz_13_iter_mapping_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9dicttoolz_13_iter_mapping_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_it = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_it,0};
PyObject* values[1] = {0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_it)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 22, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
goto __pyx_L5_argtuple_error;
} else {
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
}
__pyx_v_it = values[0];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 22, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("cytoolz.dicttoolz._iter_mapping.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7cytoolz_9dicttoolz_13_iter_mapping___cinit__(((struct __pyx_obj_7cytoolz_9dicttoolz__iter_mapping *)__pyx_v_self), __pyx_v_it);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static int __pyx_pf_7cytoolz_9dicttoolz_13_iter_mapping___cinit__(struct __pyx_obj_7cytoolz_9dicttoolz__iter_mapping *__pyx_v_self, PyObject *__pyx_v_it) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
/* "cytoolz/dicttoolz.pyx":23
* """ Keep a handle on the current item to prevent memory clean up too early"""
* def __cinit__(self, object it):
* self.it = it # <<<<<<<<<<<<<<
* self.cur = None
*
*/
__Pyx_INCREF(__pyx_v_it);
__Pyx_GIVEREF(__pyx_v_it);
__Pyx_GOTREF(__pyx_v_self->it);
__Pyx_DECREF(__pyx_v_self->it);
__pyx_v_self->it = __pyx_v_it;
/* "cytoolz/dicttoolz.pyx":24
* def __cinit__(self, object it):
* self.it = it
* self.cur = None # <<<<<<<<<<<<<<
*
* def __iter__(self):
*/
__Pyx_INCREF(Py_None);
__Pyx_GIVEREF(Py_None);
__Pyx_GOTREF(__pyx_v_self->cur);
__Pyx_DECREF(__pyx_v_self->cur);
__pyx_v_self->cur = Py_None;
/* "cytoolz/dicttoolz.pyx":22
* cdef class _iter_mapping:
* """ Keep a handle on the current item to prevent memory clean up too early"""
* def __cinit__(self, object it): # <<<<<<<<<<<<<<
* self.it = it
* self.cur = None
*/
/* function exit code */
__pyx_r = 0;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "cytoolz/dicttoolz.pyx":26
* self.cur = None
*
* def __iter__(self): # <<<<<<<<<<<<<<
* return self
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9dicttoolz_13_iter_mapping_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9dicttoolz_13_iter_mapping_3__iter__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
__pyx_r = __pyx_pf_7cytoolz_9dicttoolz_13_iter_mapping_2__iter__(((struct __pyx_obj_7cytoolz_9dicttoolz__iter_mapping *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_13_iter_mapping_2__iter__(struct __pyx_obj_7cytoolz_9dicttoolz__iter_mapping *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iter__", 0);
/* "cytoolz/dicttoolz.pyx":27
*
* def __iter__(self):
* return self # <<<<<<<<<<<<<<
*
* def __next__(self):
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
/* "cytoolz/dicttoolz.pyx":26
* self.cur = None
*
* def __iter__(self): # <<<<<<<<<<<<<<
* return self
*
*/
/* function exit code */
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "cytoolz/dicttoolz.pyx":29
* return self
*
* def __next__(self): # <<<<<<<<<<<<<<
* self.cur = next(self.it)
* return self.cur
*/
/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9dicttoolz_13_iter_mapping_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9dicttoolz_13_iter_mapping_5__next__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
__pyx_r = __pyx_pf_7cytoolz_9dicttoolz_13_iter_mapping_4__next__(((struct __pyx_obj_7cytoolz_9dicttoolz__iter_mapping *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_13_iter_mapping_4__next__(struct __pyx_obj_7cytoolz_9dicttoolz__iter_mapping *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__next__", 0);
/* "cytoolz/dicttoolz.pyx":30
*
* def __next__(self):
* self.cur = next(self.it) # <<<<<<<<<<<<<<
* return self.cur
*
*/
__pyx_t_1 = __pyx_v_self->it;
__Pyx_INCREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_v_self->cur);
__Pyx_DECREF(__pyx_v_self->cur);
__pyx_v_self->cur = __pyx_t_2;
__pyx_t_2 = 0;
/* "cytoolz/dicttoolz.pyx":31
* def __next__(self):
* self.cur = next(self.it)
* return self.cur # <<<<<<<<<<<<<<
*
*
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_self->cur);
__pyx_r = __pyx_v_self->cur;
goto __pyx_L0;
/* "cytoolz/dicttoolz.pyx":29
* return self
*
* def __next__(self): # <<<<<<<<<<<<<<
* self.cur = next(self.it)
* return self.cur
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("cytoolz.dicttoolz._iter_mapping.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "(tree fragment)":1
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
* raise TypeError("no default __reduce__ due to non-trivial __cinit__")
* def __setstate_cython__(self, __pyx_state):
*/
/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9dicttoolz_13_iter_mapping_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9dicttoolz_13_iter_mapping_6__reduce_cython__[] = "_iter_mapping.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9dicttoolz_13_iter_mapping_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9dicttoolz_13_iter_mapping_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9dicttoolz_13_iter_mapping_6__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9dicttoolz_13_iter_mapping_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
__pyx_r = __pyx_pf_7cytoolz_9dicttoolz_13_iter_mapping_6__reduce_cython__(((struct __pyx_obj_7cytoolz_9dicttoolz__iter_mapping *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_13_iter_mapping_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9dicttoolz__iter_mapping *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
/* "(tree fragment)":2
* def __reduce_cython__(self):
* raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
* def __setstate_cython__(self, __pyx_state):
* raise TypeError("no default __reduce__ due to non-trivial __cinit__")
*/
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__PYX_ERR(1, 2, __pyx_L1_error)
/* "(tree fragment)":1
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
* raise TypeError("no default __reduce__ due to non-trivial __cinit__")
* def __setstate_cython__(self, __pyx_state):
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("cytoolz.dicttoolz._iter_mapping.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "(tree fragment)":3
* def __reduce_cython__(self):
* raise TypeError("no default __reduce__ due to non-trivial __cinit__")
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
* raise TypeError("no default __reduce__ due to non-trivial __cinit__")
*/
/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9dicttoolz_13_iter_mapping_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9dicttoolz_13_iter_mapping_8__setstate_cython__[] = "_iter_mapping.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9dicttoolz_13_iter_mapping_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9dicttoolz_13_iter_mapping_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9dicttoolz_13_iter_mapping_8__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9dicttoolz_13_iter_mapping_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
__pyx_r = __pyx_pf_7cytoolz_9dicttoolz_13_iter_mapping_8__setstate_cython__(((struct __pyx_obj_7cytoolz_9dicttoolz__iter_mapping *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_7cytoolz_9dicttoolz_13_iter_mapping_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9dicttoolz__iter_mapping *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
/* "(tree fragment)":4
* raise TypeError("no default __reduce__ due to non-trivial __cinit__")
* def __setstate_cython__(self, __pyx_state):
* raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
*/
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__PYX_ERR(1, 4, __pyx_L1_error)
/* "(tree fragment)":3
* def __reduce_cython__(self):
* raise TypeError("no default __reduce__ due to non-trivial __cinit__")
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
* raise TypeError("no default __reduce__ due to non-trivial __cinit__")
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("cytoolz.dicttoolz._iter_mapping.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "cytoolz/dicttoolz.pyx":34
*
*
* cdef int PyMapping_Next(object p, Py_ssize_t *ppos, PyObject* *pkey, PyObject* *pval) except -1: # <<<<<<<<<<<<<<
* """Mimic "PyDict_Next" interface, but for any mapping"""
* cdef PyObject *obj
*/
static int __pyx_f_7cytoolz_9dicttoolz_PyMapping_Next(PyObject *__pyx_v_p, CYTHON_UNUSED Py_ssize_t *__pyx_v_ppos, PyObject **__pyx_v_pkey, PyObject **__pyx_v_pval) {
PyObject *__pyx_v_obj;
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("PyMapping_Next", 0);
/* "cytoolz/dicttoolz.pyx":37
* """Mimic "PyDict_Next" interface, but for any mapping"""
* cdef PyObject *obj
* obj = PtrIter_Next(p) # <<<<<<<<<<<<<<
* if obj is NULL:
* return 0
*/
__pyx_v_obj = PyIter_Next(__pyx_v_p);
/* "cytoolz/dicttoolz.pyx":38
* cdef PyObject *obj
* obj = PtrIter_Next(p)
* if obj is NULL: # <<<<<<<<<<<<<<
* return 0
* pkey[0] = (