coconut-develop 3.1.1.post0.dev2__tar.gz → 3.1.1.post0.dev3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/DOCS.md +4 -2
  2. coconut_develop-3.1.1.post0.dev3/PKG-INFO +393 -0
  3. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/_pyparsing.py +2 -2
  4. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/compiler/grammar.py +12 -3
  5. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/compiler/matching.py +34 -16
  6. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/constants.py +2 -2
  7. coconut_develop-3.1.1.post0.dev3/coconut/icoconut/coconut/kernel.json +11 -0
  8. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/root.py +1 -1
  9. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/cocotest/agnostic/primary_2.coco +21 -0
  10. coconut-develop-3.1.1.post0.dev2/PKG-INFO +0 -141
  11. coconut-develop-3.1.1.post0.dev2/coconut/icoconut/coconut/kernel.json +0 -11
  12. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/CONTRIBUTING.md +0 -0
  13. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/FAQ.md +0 -0
  14. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/HELP.md +0 -0
  15. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/LICENSE.txt +0 -0
  16. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/MANIFEST.in +0 -0
  17. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/README.rst +0 -0
  18. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/__coconut__/__init__.py +0 -0
  19. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/__coconut__/__init__.pyi +0 -0
  20. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/__coconut__/py.typed +0 -0
  21. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/_coconut/__init__.py +0 -0
  22. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/_coconut/__init__.pyi +0 -0
  23. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/_coconut/py.typed +0 -0
  24. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/__coconut__.py +0 -0
  25. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/__coconut__.pyi +0 -0
  26. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/__init__.py +0 -0
  27. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/__init__.pyi +0 -0
  28. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/__main__.py +0 -0
  29. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/api.py +0 -0
  30. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/api.pyi +0 -0
  31. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/command/__init__.py +0 -0
  32. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/command/__init__.pyi +0 -0
  33. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/command/cli.py +0 -0
  34. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/command/command.py +0 -0
  35. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/command/command.pyi +0 -0
  36. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/command/mypy.py +0 -0
  37. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/command/resources/zcoconut.pth +0 -0
  38. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/command/util.py +0 -0
  39. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/command/watch.py +0 -0
  40. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/compiler/__init__.py +0 -0
  41. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/compiler/compiler.py +0 -0
  42. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/compiler/header.py +0 -0
  43. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/compiler/templates/header.py_template +0 -0
  44. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/compiler/util.py +0 -0
  45. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/convenience.py +0 -0
  46. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/convenience.pyi +0 -0
  47. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/exceptions.py +0 -0
  48. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/highlighter.py +0 -0
  49. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/icoconut/__init__.py +0 -0
  50. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/icoconut/__main__.py +0 -0
  51. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/icoconut/coconut_py/kernel.json +0 -0
  52. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/icoconut/coconut_py2/kernel.json +0 -0
  53. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/icoconut/coconut_py3/kernel.json +0 -0
  54. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/icoconut/embed.py +0 -0
  55. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/icoconut/root.py +0 -0
  56. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/integrations.py +0 -0
  57. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/main.py +0 -0
  58. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/py.typed +0 -0
  59. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/requirements.py +0 -0
  60. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/terminal.py +0 -0
  61. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/__init__.py +0 -0
  62. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/__main__.py +0 -0
  63. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/constants_test.py +0 -0
  64. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/main_test.py +0 -0
  65. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/cocotest/agnostic/__init__.coco +0 -0
  66. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/cocotest/agnostic/__main__.coco +0 -0
  67. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/cocotest/agnostic/main.coco +0 -0
  68. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/cocotest/agnostic/primary_1.coco +0 -0
  69. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/cocotest/agnostic/specific.coco +0 -0
  70. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/cocotest/agnostic/suite.coco +0 -0
  71. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/cocotest/agnostic/tutorial.coco +0 -0
  72. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/cocotest/agnostic/util.coco +0 -0
  73. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/cocotest/non_strict/non_strict_test.coco +0 -0
  74. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/cocotest/target_2/py2_test.coco +0 -0
  75. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/cocotest/target_3/py3_test.coco +0 -0
  76. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/cocotest/target_311/py311_test.coco +0 -0
  77. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/cocotest/target_35/py35_test.coco +0 -0
  78. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/cocotest/target_36/py36_test.coco +0 -0
  79. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/cocotest/target_38/py38_test.coco +0 -0
  80. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/cocotest/target_sys/target_sys_test.coco +0 -0
  81. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/extras.coco +0 -0
  82. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/importable.coco +0 -0
  83. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/runnable.coco +0 -0
  84. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/tests/src/runner.coco +0 -0
  85. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut/util.py +0 -0
  86. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/coconut_develop.egg-info/SOURCES.txt +0 -0
  87. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/conf.py +0 -0
  88. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/pyproject.toml +0 -0
  89. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/setup.cfg +0 -0
  90. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/setup.py +0 -0
  91. {coconut-develop-3.1.1.post0.dev2 → coconut_develop-3.1.1.post0.dev3}/xontrib/coconut.py +0 -0
@@ -1204,6 +1204,7 @@ base_pattern ::= (
1204
1204
  | NAME "(" patterns ")" # classes or data types
1205
1205
  | "data" NAME "(" patterns ")" # data types
1206
1206
  | "class" NAME "(" patterns ")" # classes
1207
+ | "(" name "=" pattern ... ")" # anonymous named tuples
1207
1208
  | "{" pattern_pairs # dictionaries
1208
1209
  ["," "**" (NAME | "{}")] "}" # (keys must be constants or equality checks)
1209
1210
  | ["s" | "f" | "m"] "{"
@@ -1269,7 +1270,8 @@ base_pattern ::= (
1269
1270
  - Classes or Data Types (`<name>(<args>)`): will match as a data type if given [a Coconut `data` type](#data) (or a tuple of Coconut data types) and a class otherwise.
1270
1271
  - Data Types (`data <name>(<args>)`): will check that whatever is in that position is of data type `<name>` and will match the attributes to `<args>`. Generally, `data <name>(<args>)` will match any data type that could have been constructed with `makedata(<name>, <args>)`. Includes support for positional arguments, named arguments, default arguments, and starred arguments. Also supports strict attributes by prepending a dot to the attribute name that raises `AttributError` if the attribute is not present rather than failing the match (e.g. `data MyData(.my_attr=<some_pattern>)`).
1271
1272
  - Classes (`class <name>(<args>)`): does [PEP-634-style class matching](https://www.python.org/dev/peps/pep-0634/#class-patterns). Also supports strict attribute matching as above.
1272
- - Mapping Destructuring:
1273
+ - Anonymous Named Tuples (`(<name>=<pattern>, ...)`): checks that the object is a `tuple` of the given length with the given attributes. For matching [anonymous `namedtuple`s](#anonymous-namedtuples).
1274
+ - Dict Destructuring:
1273
1275
  - Dicts (`{<key>: <value>, ...}`): will match any mapping (`collections.abc.Mapping`) with the given keys and values that match the value patterns. Keys must be constants or equality checks.
1274
1276
  - Dicts With Rest (`{<pairs>, **<rest>}`): will match a mapping (`collections.abc.Mapping`) containing all the `<pairs>`, and will put a `dict` of everything else into `<rest>`. If `<rest>` is `{}`, will enforce that the mapping is exactly the same length as `<pairs>`.
1275
1277
  - Set Destructuring:
@@ -2233,7 +2235,7 @@ as a shorthand for
2233
2235
  f(long_variable_name=long_variable_name)
2234
2236
  ```
2235
2237
 
2236
- Such syntax is also supported in [partial application](#partial-application) and [anonymous `namedtuple`s](#anonymous-namedtuples).
2238
+ Such syntax is also supported in [partial application](#partial-application), [anonymous `namedtuple`s](#anonymous-namedtuples), and [`class`/`data`/anonymous `namedtuple` patterns](#match).
2237
2239
 
2238
2240
  _Deprecated: Coconut also supports `f(...=long_variable_name)` as an alternative shorthand syntax._
2239
2241
 
@@ -0,0 +1,393 @@
1
+ Metadata-Version: 2.1
2
+ Name: coconut-develop
3
+ Version: 3.1.1.post0.dev3
4
+ Summary: Simple, elegant, Pythonic functional programming.
5
+ Home-page: http://coconut-lang.org
6
+ Author: Evan Hubinger
7
+ Author-email: evanjhub@gmail.com
8
+ License: Apache 2.0
9
+ Keywords: functional,programming,language,compiler,pattern,pattern-matching,algebraic,data type,data types,lambda,lambdas,lazy,evaluation,lazy list,lazy lists,tail,recursion,call,recursive,recursive_iterator,infix,function,composition,compose,partial,application,currying,curry,pipeline,pipe,unicode,operator,operators,frozenset,literal,syntax,destructuring,assignment,fold,datamaker,prepattern,iterator,generator,none,coalesce,coalescing,statement,lru_cache,memoization,backport,typing,embed,PEP 622,overrides,islice,itertools,functools,TYPE_CHECKING,Expected,breakpoint,help,reduce,takewhile,dropwhile,tee,count,makedata,consume,process_map,thread_map,addpattern,recursive_generator,fmap,starmap,reiterable,scan,groupsof,memoize,zip_longest,override,flatten,ident,call,safe_call,flip,const,lift,lift_apart,all_equal,collectby,mapreduce,multi_enumerate,cartesian_product,multiset,cycle,windowsof,and_then,and_then_await,async_map,py_chr,py_dict,py_hex,py_input,py_int,py_map,py_object,py_oct,py_open,py_print,py_range,py_str,py_super,py_zip,py_filter,py_reversed,py_enumerate,py_raw_input,py_xrange,py_repr,py_breakpoint,py_min,py_max,_namedtuple_of,reveal_type,reveal_locals,MatchError,CoconutWarning,__fmap__,__iter_getitem__,data,match,case,cases,where,addpattern,then,operator,type,copyclosure,λ
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: License :: OSI Approved :: Apache Software License
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Topic :: Software Development
14
+ Classifier: Topic :: Software Development :: Code Generators
15
+ Classifier: Topic :: Software Development :: Compilers
16
+ Classifier: Topic :: Software Development :: Interpreters
17
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
+ Classifier: Topic :: Utilities
19
+ Classifier: Environment :: Console
20
+ Classifier: Operating System :: OS Independent
21
+ Classifier: Programming Language :: Python
22
+ Classifier: Programming Language :: Python :: 2
23
+ Classifier: Programming Language :: Python :: 2.6
24
+ Classifier: Programming Language :: Python :: 2.7
25
+ Classifier: Programming Language :: Python :: 3
26
+ Classifier: Programming Language :: Python :: 3.2
27
+ Classifier: Programming Language :: Python :: 3.3
28
+ Classifier: Programming Language :: Python :: 3.4
29
+ Classifier: Programming Language :: Python :: 3.5
30
+ Classifier: Programming Language :: Python :: 3.6
31
+ Classifier: Programming Language :: Python :: 3.7
32
+ Classifier: Programming Language :: Python :: 3.8
33
+ Classifier: Programming Language :: Python :: 3.9
34
+ Classifier: Programming Language :: Python :: 3.10
35
+ Classifier: Programming Language :: Python :: 3.11
36
+ Classifier: Programming Language :: Python :: 3.12
37
+ Classifier: Programming Language :: Other
38
+ Classifier: Programming Language :: Other Scripting Engines
39
+ Classifier: Programming Language :: Python :: Implementation :: CPython
40
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
41
+ Classifier: Framework :: IPython
42
+ Classifier: Framework :: Jupyter
43
+ Classifier: Typing :: Typed
44
+ License-File: LICENSE.txt
45
+ Requires-Dist: setuptools>=44
46
+ Provides-Extra: kernel
47
+ Requires-Dist: ipython>=5.4; python_version < "3" and extra == "kernel"
48
+ Requires-Dist: ipython<7.10,>=7.9; (python_version >= "3" and python_version < "3.7") and extra == "kernel"
49
+ Requires-Dist: ipython>=7.34; (python_version >= "3.7" and python_version < "3.8") and extra == "kernel"
50
+ Requires-Dist: ipython>=8.12; (python_version >= "3.8" and python_version < "3.9") and extra == "kernel"
51
+ Requires-Dist: ipython>=8.18; (python_version >= "3.9" and python_version < "3.10") and extra == "kernel"
52
+ Requires-Dist: ipython>=8.25; python_version >= "3.10" and extra == "kernel"
53
+ Requires-Dist: ipykernel>=4.10; python_version < "3" and extra == "kernel"
54
+ Requires-Dist: ipykernel>=5.5; (python_version >= "3" and python_version < "3.8") and extra == "kernel"
55
+ Requires-Dist: ipykernel>=6; python_version >= "3.8" and extra == "kernel"
56
+ Requires-Dist: jupyter-client>=5.3; python_version < "3.5" and extra == "kernel"
57
+ Requires-Dist: jupyter-client<6.1.13,>=6.1.12; (python_version >= "3.5" and python_version < "3.6") and extra == "kernel"
58
+ Requires-Dist: jupyter-client>=7.1.2; python_version >= "3.6" and extra == "kernel"
59
+ Requires-Dist: jedi<0.18,>=0.17; python_version < "3.9" and extra == "kernel"
60
+ Requires-Dist: jedi>=0.19; python_version >= "3.9" and extra == "kernel"
61
+ Requires-Dist: pywinpty<0.6,>=0.5; (python_version < "3" and os_name == "nt") and extra == "kernel"
62
+ Provides-Extra: watch
63
+ Requires-Dist: watchdog>=0.10; extra == "watch"
64
+ Provides-Extra: mypy
65
+ Requires-Dist: mypy[python2]>=1.10; extra == "mypy"
66
+ Requires-Dist: types-backports>=0.1; extra == "mypy"
67
+ Requires-Dist: typing>=3.10; python_version < "3.5" and extra == "mypy"
68
+ Provides-Extra: pyright
69
+ Requires-Dist: pyright>=1.1; extra == "pyright"
70
+ Requires-Dist: types-backports>=0.1; extra == "pyright"
71
+ Requires-Dist: typing>=3.10; python_version < "3.5" and extra == "pyright"
72
+ Provides-Extra: xonsh
73
+ Requires-Dist: xonsh>=0.9; python_version < "3.6" and extra == "xonsh"
74
+ Requires-Dist: xonsh>=0.11; (python_version >= "3.6" and python_version < "3.9") and extra == "xonsh"
75
+ Requires-Dist: xonsh>=0.16; python_version >= "3.9" and extra == "xonsh"
76
+ Provides-Extra: numpy
77
+ Requires-Dist: numpy>=1.16; (python_version < "3" and platform_python_implementation == "CPython") and extra == "numpy"
78
+ Requires-Dist: numpy>=1.18; (python_version >= "3.4" and python_version < "3.9") and extra == "numpy"
79
+ Requires-Dist: numpy>=1.26; python_version >= "3.9" and extra == "numpy"
80
+ Requires-Dist: pandas>=1; python_version >= "3.6" and extra == "numpy"
81
+ Requires-Dist: xarray>=2024; python_version >= "3.9" and extra == "numpy"
82
+ Provides-Extra: jupyter
83
+ Requires-Dist: ipython>=5.4; python_version < "3" and extra == "jupyter"
84
+ Requires-Dist: ipython<7.10,>=7.9; (python_version >= "3" and python_version < "3.7") and extra == "jupyter"
85
+ Requires-Dist: ipython>=7.34; (python_version >= "3.7" and python_version < "3.8") and extra == "jupyter"
86
+ Requires-Dist: ipython>=8.12; (python_version >= "3.8" and python_version < "3.9") and extra == "jupyter"
87
+ Requires-Dist: ipython>=8.18; (python_version >= "3.9" and python_version < "3.10") and extra == "jupyter"
88
+ Requires-Dist: ipython>=8.25; python_version >= "3.10" and extra == "jupyter"
89
+ Requires-Dist: ipykernel>=4.10; python_version < "3" and extra == "jupyter"
90
+ Requires-Dist: ipykernel>=5.5; (python_version >= "3" and python_version < "3.8") and extra == "jupyter"
91
+ Requires-Dist: ipykernel>=6; python_version >= "3.8" and extra == "jupyter"
92
+ Requires-Dist: jupyter-client>=5.3; python_version < "3.5" and extra == "jupyter"
93
+ Requires-Dist: jupyter-client<6.1.13,>=6.1.12; (python_version >= "3.5" and python_version < "3.6") and extra == "jupyter"
94
+ Requires-Dist: jupyter-client>=7.1.2; python_version >= "3.6" and extra == "jupyter"
95
+ Requires-Dist: jedi<0.18,>=0.17; python_version < "3.9" and extra == "jupyter"
96
+ Requires-Dist: jedi>=0.19; python_version >= "3.9" and extra == "jupyter"
97
+ Requires-Dist: pywinpty<0.6,>=0.5; (python_version < "3" and os_name == "nt") and extra == "jupyter"
98
+ Requires-Dist: jupyter>=1.0; extra == "jupyter"
99
+ Requires-Dist: jupyter-console>=5.2; python_version < "3.5" and extra == "jupyter"
100
+ Requires-Dist: jupyter-console>=6.1; (python_version >= "3.5" and python_version < "3.7") and extra == "jupyter"
101
+ Requires-Dist: jupyter-console>=6.6; python_version >= "3.7" and extra == "jupyter"
102
+ Requires-Dist: papermill>=1.2; extra == "jupyter"
103
+ Provides-Extra: jupyterlab
104
+ Requires-Dist: ipython>=5.4; python_version < "3" and extra == "jupyterlab"
105
+ Requires-Dist: ipython<7.10,>=7.9; (python_version >= "3" and python_version < "3.7") and extra == "jupyterlab"
106
+ Requires-Dist: ipython>=7.34; (python_version >= "3.7" and python_version < "3.8") and extra == "jupyterlab"
107
+ Requires-Dist: ipython>=8.12; (python_version >= "3.8" and python_version < "3.9") and extra == "jupyterlab"
108
+ Requires-Dist: ipython>=8.18; (python_version >= "3.9" and python_version < "3.10") and extra == "jupyterlab"
109
+ Requires-Dist: ipython>=8.25; python_version >= "3.10" and extra == "jupyterlab"
110
+ Requires-Dist: ipykernel>=4.10; python_version < "3" and extra == "jupyterlab"
111
+ Requires-Dist: ipykernel>=5.5; (python_version >= "3" and python_version < "3.8") and extra == "jupyterlab"
112
+ Requires-Dist: ipykernel>=6; python_version >= "3.8" and extra == "jupyterlab"
113
+ Requires-Dist: jupyter-client>=5.3; python_version < "3.5" and extra == "jupyterlab"
114
+ Requires-Dist: jupyter-client<6.1.13,>=6.1.12; (python_version >= "3.5" and python_version < "3.6") and extra == "jupyterlab"
115
+ Requires-Dist: jupyter-client>=7.1.2; python_version >= "3.6" and extra == "jupyterlab"
116
+ Requires-Dist: jedi<0.18,>=0.17; python_version < "3.9" and extra == "jupyterlab"
117
+ Requires-Dist: jedi>=0.19; python_version >= "3.9" and extra == "jupyterlab"
118
+ Requires-Dist: pywinpty<0.6,>=0.5; (python_version < "3" and os_name == "nt") and extra == "jupyterlab"
119
+ Requires-Dist: jupyter>=1.0; extra == "jupyterlab"
120
+ Requires-Dist: jupyter-console>=5.2; python_version < "3.5" and extra == "jupyterlab"
121
+ Requires-Dist: jupyter-console>=6.1; (python_version >= "3.5" and python_version < "3.7") and extra == "jupyterlab"
122
+ Requires-Dist: jupyter-console>=6.6; python_version >= "3.7" and extra == "jupyterlab"
123
+ Requires-Dist: papermill>=1.2; extra == "jupyterlab"
124
+ Requires-Dist: jupyterlab>=2.2; python_version >= "3.5" and extra == "jupyterlab"
125
+ Provides-Extra: jupytext
126
+ Requires-Dist: ipython>=5.4; python_version < "3" and extra == "jupytext"
127
+ Requires-Dist: ipython<7.10,>=7.9; (python_version >= "3" and python_version < "3.7") and extra == "jupytext"
128
+ Requires-Dist: ipython>=7.34; (python_version >= "3.7" and python_version < "3.8") and extra == "jupytext"
129
+ Requires-Dist: ipython>=8.12; (python_version >= "3.8" and python_version < "3.9") and extra == "jupytext"
130
+ Requires-Dist: ipython>=8.18; (python_version >= "3.9" and python_version < "3.10") and extra == "jupytext"
131
+ Requires-Dist: ipython>=8.25; python_version >= "3.10" and extra == "jupytext"
132
+ Requires-Dist: ipykernel>=4.10; python_version < "3" and extra == "jupytext"
133
+ Requires-Dist: ipykernel>=5.5; (python_version >= "3" and python_version < "3.8") and extra == "jupytext"
134
+ Requires-Dist: ipykernel>=6; python_version >= "3.8" and extra == "jupytext"
135
+ Requires-Dist: jupyter-client>=5.3; python_version < "3.5" and extra == "jupytext"
136
+ Requires-Dist: jupyter-client<6.1.13,>=6.1.12; (python_version >= "3.5" and python_version < "3.6") and extra == "jupytext"
137
+ Requires-Dist: jupyter-client>=7.1.2; python_version >= "3.6" and extra == "jupytext"
138
+ Requires-Dist: jedi<0.18,>=0.17; python_version < "3.9" and extra == "jupytext"
139
+ Requires-Dist: jedi>=0.19; python_version >= "3.9" and extra == "jupytext"
140
+ Requires-Dist: pywinpty<0.6,>=0.5; (python_version < "3" and os_name == "nt") and extra == "jupytext"
141
+ Requires-Dist: jupyter>=1.0; extra == "jupytext"
142
+ Requires-Dist: jupyter-console>=5.2; python_version < "3.5" and extra == "jupytext"
143
+ Requires-Dist: jupyter-console>=6.1; (python_version >= "3.5" and python_version < "3.7") and extra == "jupytext"
144
+ Requires-Dist: jupyter-console>=6.6; python_version >= "3.7" and extra == "jupytext"
145
+ Requires-Dist: papermill>=1.2; extra == "jupytext"
146
+ Requires-Dist: jupytext>=1.8; python_version >= "3" and extra == "jupytext"
147
+ Provides-Extra: all
148
+ Requires-Dist: ipython>=5.4; python_version < "3" and extra == "all"
149
+ Requires-Dist: ipython<7.10,>=7.9; (python_version >= "3" and python_version < "3.7") and extra == "all"
150
+ Requires-Dist: ipython>=7.34; (python_version >= "3.7" and python_version < "3.8") and extra == "all"
151
+ Requires-Dist: ipython>=8.12; (python_version >= "3.8" and python_version < "3.9") and extra == "all"
152
+ Requires-Dist: ipython>=8.18; (python_version >= "3.9" and python_version < "3.10") and extra == "all"
153
+ Requires-Dist: ipython>=8.25; python_version >= "3.10" and extra == "all"
154
+ Requires-Dist: ipykernel>=4.10; python_version < "3" and extra == "all"
155
+ Requires-Dist: ipykernel>=5.5; (python_version >= "3" and python_version < "3.8") and extra == "all"
156
+ Requires-Dist: ipykernel>=6; python_version >= "3.8" and extra == "all"
157
+ Requires-Dist: jupyter-client>=5.3; python_version < "3.5" and extra == "all"
158
+ Requires-Dist: jupyter-client<6.1.13,>=6.1.12; (python_version >= "3.5" and python_version < "3.6") and extra == "all"
159
+ Requires-Dist: jupyter-client>=7.1.2; python_version >= "3.6" and extra == "all"
160
+ Requires-Dist: jedi<0.18,>=0.17; python_version < "3.9" and extra == "all"
161
+ Requires-Dist: jedi>=0.19; python_version >= "3.9" and extra == "all"
162
+ Requires-Dist: pywinpty<0.6,>=0.5; (python_version < "3" and os_name == "nt") and extra == "all"
163
+ Requires-Dist: watchdog>=0.10; extra == "all"
164
+ Requires-Dist: mypy[python2]>=1.10; extra == "all"
165
+ Requires-Dist: types-backports>=0.1; extra == "all"
166
+ Requires-Dist: typing>=3.10; python_version < "3.5" and extra == "all"
167
+ Requires-Dist: pyright>=1.1; extra == "all"
168
+ Requires-Dist: xonsh>=0.9; python_version < "3.6" and extra == "all"
169
+ Requires-Dist: xonsh>=0.11; (python_version >= "3.6" and python_version < "3.9") and extra == "all"
170
+ Requires-Dist: xonsh>=0.16; python_version >= "3.9" and extra == "all"
171
+ Requires-Dist: numpy>=1.16; (python_version < "3" and platform_python_implementation == "CPython") and extra == "all"
172
+ Requires-Dist: numpy>=1.18; (python_version >= "3.4" and python_version < "3.9") and extra == "all"
173
+ Requires-Dist: numpy>=1.26; python_version >= "3.9" and extra == "all"
174
+ Requires-Dist: pandas>=1; python_version >= "3.6" and extra == "all"
175
+ Requires-Dist: xarray>=2024; python_version >= "3.9" and extra == "all"
176
+ Requires-Dist: jupyter>=1.0; extra == "all"
177
+ Requires-Dist: jupyter-console>=5.2; python_version < "3.5" and extra == "all"
178
+ Requires-Dist: jupyter-console>=6.1; (python_version >= "3.5" and python_version < "3.7") and extra == "all"
179
+ Requires-Dist: jupyter-console>=6.6; python_version >= "3.7" and extra == "all"
180
+ Requires-Dist: papermill>=1.2; extra == "all"
181
+ Requires-Dist: jupyterlab>=2.2; python_version >= "3.5" and extra == "all"
182
+ Requires-Dist: jupytext>=1.8; python_version >= "3" and extra == "all"
183
+ Provides-Extra: ipython
184
+ Requires-Dist: ipython>=5.4; python_version < "3" and extra == "ipython"
185
+ Requires-Dist: ipython<7.10,>=7.9; (python_version >= "3" and python_version < "3.7") and extra == "ipython"
186
+ Requires-Dist: ipython>=7.34; (python_version >= "3.7" and python_version < "3.8") and extra == "ipython"
187
+ Requires-Dist: ipython>=8.12; (python_version >= "3.8" and python_version < "3.9") and extra == "ipython"
188
+ Requires-Dist: ipython>=8.18; (python_version >= "3.9" and python_version < "3.10") and extra == "ipython"
189
+ Requires-Dist: ipython>=8.25; python_version >= "3.10" and extra == "ipython"
190
+ Requires-Dist: ipykernel>=4.10; python_version < "3" and extra == "ipython"
191
+ Requires-Dist: ipykernel>=5.5; (python_version >= "3" and python_version < "3.8") and extra == "ipython"
192
+ Requires-Dist: ipykernel>=6; python_version >= "3.8" and extra == "ipython"
193
+ Requires-Dist: jupyter-client>=5.3; python_version < "3.5" and extra == "ipython"
194
+ Requires-Dist: jupyter-client<6.1.13,>=6.1.12; (python_version >= "3.5" and python_version < "3.6") and extra == "ipython"
195
+ Requires-Dist: jupyter-client>=7.1.2; python_version >= "3.6" and extra == "ipython"
196
+ Requires-Dist: jedi<0.18,>=0.17; python_version < "3.9" and extra == "ipython"
197
+ Requires-Dist: jedi>=0.19; python_version >= "3.9" and extra == "ipython"
198
+ Requires-Dist: pywinpty<0.6,>=0.5; (python_version < "3" and os_name == "nt") and extra == "ipython"
199
+ Requires-Dist: jupyter>=1.0; extra == "ipython"
200
+ Requires-Dist: jupyter-console>=5.2; python_version < "3.5" and extra == "ipython"
201
+ Requires-Dist: jupyter-console>=6.1; (python_version >= "3.5" and python_version < "3.7") and extra == "ipython"
202
+ Requires-Dist: jupyter-console>=6.6; python_version >= "3.7" and extra == "ipython"
203
+ Requires-Dist: papermill>=1.2; extra == "ipython"
204
+ Provides-Extra: docs
205
+ Requires-Dist: sphinx>=7; extra == "docs"
206
+ Requires-Dist: pygments>=2.3; python_version < "3.9" and extra == "docs"
207
+ Requires-Dist: pygments>=2.18; python_version >= "3.9" and extra == "docs"
208
+ Requires-Dist: myst-parser>=3; extra == "docs"
209
+ Requires-Dist: pydata-sphinx-theme>=0.15; extra == "docs"
210
+ Provides-Extra: tests
211
+ Requires-Dist: pytest>=3; python_version < "3.6" and extra == "tests"
212
+ Requires-Dist: pytest>=7; (python_version >= "3.6" and python_version < "3.8") and extra == "tests"
213
+ Requires-Dist: pytest<8.1,>=8.0; python_version >= "3.8" and extra == "tests"
214
+ Requires-Dist: pexpect>=4; extra == "tests"
215
+ Requires-Dist: numpy>=1.16; (python_version < "3" and platform_python_implementation == "CPython") and extra == "tests"
216
+ Requires-Dist: numpy>=1.18; (python_version >= "3.4" and python_version < "3.9") and extra == "tests"
217
+ Requires-Dist: numpy>=1.26; python_version >= "3.9" and extra == "tests"
218
+ Requires-Dist: pandas>=1; python_version >= "3.6" and extra == "tests"
219
+ Requires-Dist: xarray>=2024; python_version >= "3.9" and extra == "tests"
220
+ Requires-Dist: ipython>=5.4; python_version < "3" and extra == "tests"
221
+ Requires-Dist: ipython<7.10,>=7.9; (python_version >= "3" and python_version < "3.7") and extra == "tests"
222
+ Requires-Dist: ipython>=7.34; (python_version >= "3.7" and python_version < "3.8") and extra == "tests"
223
+ Requires-Dist: ipython>=8.12; (python_version >= "3.8" and python_version < "3.9") and extra == "tests"
224
+ Requires-Dist: ipython>=8.18; (python_version >= "3.9" and python_version < "3.10") and extra == "tests"
225
+ Requires-Dist: ipython>=8.25; python_version >= "3.10" and extra == "tests"
226
+ Requires-Dist: ipykernel>=4.10; python_version < "3" and extra == "tests"
227
+ Requires-Dist: ipykernel>=5.5; (python_version >= "3" and python_version < "3.8") and extra == "tests"
228
+ Requires-Dist: ipykernel>=6; python_version >= "3.8" and extra == "tests"
229
+ Requires-Dist: jupyter-client>=5.3; python_version < "3.5" and extra == "tests"
230
+ Requires-Dist: jupyter-client<6.1.13,>=6.1.12; (python_version >= "3.5" and python_version < "3.6") and extra == "tests"
231
+ Requires-Dist: jupyter-client>=7.1.2; python_version >= "3.6" and extra == "tests"
232
+ Requires-Dist: jedi<0.18,>=0.17; python_version < "3.9" and extra == "tests"
233
+ Requires-Dist: jedi>=0.19; python_version >= "3.9" and extra == "tests"
234
+ Requires-Dist: pywinpty<0.6,>=0.5; (python_version < "3" and os_name == "nt") and extra == "tests"
235
+ Requires-Dist: jupyter>=1.0; extra == "tests"
236
+ Requires-Dist: jupyter-console>=5.2; python_version < "3.5" and extra == "tests"
237
+ Requires-Dist: jupyter-console>=6.1; (python_version >= "3.5" and python_version < "3.7") and extra == "tests"
238
+ Requires-Dist: jupyter-console>=6.6; python_version >= "3.7" and extra == "tests"
239
+ Requires-Dist: papermill>=1.2; extra == "tests"
240
+ Provides-Extra: dev
241
+ Requires-Dist: ipython>=5.4; python_version < "3" and extra == "dev"
242
+ Requires-Dist: ipython<7.10,>=7.9; (python_version >= "3" and python_version < "3.7") and extra == "dev"
243
+ Requires-Dist: ipython>=7.34; (python_version >= "3.7" and python_version < "3.8") and extra == "dev"
244
+ Requires-Dist: ipython>=8.12; (python_version >= "3.8" and python_version < "3.9") and extra == "dev"
245
+ Requires-Dist: ipython>=8.18; (python_version >= "3.9" and python_version < "3.10") and extra == "dev"
246
+ Requires-Dist: ipython>=8.25; python_version >= "3.10" and extra == "dev"
247
+ Requires-Dist: ipykernel>=4.10; python_version < "3" and extra == "dev"
248
+ Requires-Dist: ipykernel>=5.5; (python_version >= "3" and python_version < "3.8") and extra == "dev"
249
+ Requires-Dist: ipykernel>=6; python_version >= "3.8" and extra == "dev"
250
+ Requires-Dist: jupyter-client>=5.3; python_version < "3.5" and extra == "dev"
251
+ Requires-Dist: jupyter-client<6.1.13,>=6.1.12; (python_version >= "3.5" and python_version < "3.6") and extra == "dev"
252
+ Requires-Dist: jupyter-client>=7.1.2; python_version >= "3.6" and extra == "dev"
253
+ Requires-Dist: jedi<0.18,>=0.17; python_version < "3.9" and extra == "dev"
254
+ Requires-Dist: jedi>=0.19; python_version >= "3.9" and extra == "dev"
255
+ Requires-Dist: pywinpty<0.6,>=0.5; (python_version < "3" and os_name == "nt") and extra == "dev"
256
+ Requires-Dist: watchdog>=0.10; extra == "dev"
257
+ Requires-Dist: mypy[python2]>=1.10; extra == "dev"
258
+ Requires-Dist: types-backports>=0.1; extra == "dev"
259
+ Requires-Dist: typing>=3.10; python_version < "3.5" and extra == "dev"
260
+ Requires-Dist: pyright>=1.1; extra == "dev"
261
+ Requires-Dist: xonsh>=0.9; python_version < "3.6" and extra == "dev"
262
+ Requires-Dist: xonsh>=0.11; (python_version >= "3.6" and python_version < "3.9") and extra == "dev"
263
+ Requires-Dist: xonsh>=0.16; python_version >= "3.9" and extra == "dev"
264
+ Requires-Dist: numpy>=1.16; (python_version < "3" and platform_python_implementation == "CPython") and extra == "dev"
265
+ Requires-Dist: numpy>=1.18; (python_version >= "3.4" and python_version < "3.9") and extra == "dev"
266
+ Requires-Dist: numpy>=1.26; python_version >= "3.9" and extra == "dev"
267
+ Requires-Dist: pandas>=1; python_version >= "3.6" and extra == "dev"
268
+ Requires-Dist: xarray>=2024; python_version >= "3.9" and extra == "dev"
269
+ Requires-Dist: jupyter>=1.0; extra == "dev"
270
+ Requires-Dist: jupyter-console>=5.2; python_version < "3.5" and extra == "dev"
271
+ Requires-Dist: jupyter-console>=6.1; (python_version >= "3.5" and python_version < "3.7") and extra == "dev"
272
+ Requires-Dist: jupyter-console>=6.6; python_version >= "3.7" and extra == "dev"
273
+ Requires-Dist: papermill>=1.2; extra == "dev"
274
+ Requires-Dist: jupyterlab>=2.2; python_version >= "3.5" and extra == "dev"
275
+ Requires-Dist: jupytext>=1.8; python_version >= "3" and extra == "dev"
276
+ Requires-Dist: sphinx>=7; extra == "dev"
277
+ Requires-Dist: pygments>=2.3; python_version < "3.9" and extra == "dev"
278
+ Requires-Dist: pygments>=2.18; python_version >= "3.9" and extra == "dev"
279
+ Requires-Dist: myst-parser>=3; extra == "dev"
280
+ Requires-Dist: pydata-sphinx-theme>=0.15; extra == "dev"
281
+ Requires-Dist: pytest>=3; python_version < "3.6" and extra == "dev"
282
+ Requires-Dist: pytest>=7; (python_version >= "3.6" and python_version < "3.8") and extra == "dev"
283
+ Requires-Dist: pytest<8.1,>=8.0; python_version >= "3.8" and extra == "dev"
284
+ Requires-Dist: pexpect>=4; extra == "dev"
285
+ Requires-Dist: pyparsing<2.4.8,>=2.4.7; extra == "dev"
286
+ Requires-Dist: pre-commit>=3; python_version >= "3" and extra == "dev"
287
+ Requires-Dist: requests>=2.32; extra == "dev"
288
+ Requires-Dist: vprof>=0.36; extra == "dev"
289
+ Requires-Dist: py-spy>=0.3; extra == "dev"
290
+ Requires-Dist: argparse>=1.4; python_version < "2.7"
291
+ Requires-Dist: psutil>=5; python_version >= "2.7"
292
+ Requires-Dist: futures>=3.4; python_version < "3"
293
+ Requires-Dist: backports.functools-lru-cache>=1.6; python_version < "3"
294
+ Requires-Dist: prompt_toolkit<2,>=1; python_version < "3"
295
+ Requires-Dist: prompt_toolkit>=1; python_version >= "3"
296
+ Requires-Dist: pygments>=2.3; python_version < "3.9"
297
+ Requires-Dist: pygments>=2.18; python_version >= "3.9"
298
+ Requires-Dist: typing_extensions>=3.10; python_version < "3.6"
299
+ Requires-Dist: typing_extensions>=4.1; python_version >= "3.6" and python_version < "3.7"
300
+ Requires-Dist: dataclasses>=0.8; python_version >= "3.6" and python_version < "3.7"
301
+ Requires-Dist: typing_extensions>=4.7; python_version >= "3.7" and python_version < "3.8"
302
+ Requires-Dist: typing_extensions>=4.12; python_version >= "3.8"
303
+ Requires-Dist: trollius>=2.2; python_version < "3" and platform_python_implementation == "CPython"
304
+ Requires-Dist: aenum>=3.1.15; python_version < "3.4"
305
+ Requires-Dist: typing>=3.10; python_version < "3.5"
306
+ Requires-Dist: async_generator>=1.10; python_version >= "3.5"
307
+ Requires-Dist: exceptiongroup>=1; python_version >= "3.7" and python_version < "3.11"
308
+ Requires-Dist: anyio>=3; python_version >= "3.6"
309
+ Requires-Dist: cPyparsing<2.4.7.2.5,>=2.4.7.2.4.0; platform_python_implementation == "CPython"
310
+ Requires-Dist: pyparsing<2.4.8,>=2.4.7; platform_python_implementation != "CPython"
311
+
312
+ |logo| Coconut
313
+ ==============
314
+
315
+ ..
316
+ <insert toctree here>
317
+
318
+ .. |logo| image:: https://github.com/evhub/coconut/raw/gh-pages/favicon-32x32.png
319
+
320
+ .. image:: https://opencollective.com/coconut/backers/badge.svg
321
+ :alt: Backers on Open Collective
322
+ :target: #backers
323
+ .. image:: https://opencollective.com/coconut/sponsors/badge.svg
324
+ :alt: Sponsors on Open Collective
325
+ :target: #sponsors
326
+ .. image:: https://badges.gitter.im/evhub/coconut.svg
327
+ :alt: Join the chat at https://gitter.im/evhub/coconut
328
+ :target: https://gitter.im/evhub/coconut?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
329
+
330
+ Coconut (`coconut-lang.org`__) is a variant of Python_ that **adds on top of Python syntax** new features for simple, elegant, Pythonic **functional programming**.
331
+
332
+ __ Coconut_
333
+ .. _Coconut: http://coconut-lang.org/
334
+
335
+ Coconut is developed on GitHub_ and hosted on PyPI_. Installing Coconut is as easy as opening a command prompt and entering::
336
+
337
+ pip install coconut
338
+
339
+ To help you get started, check out these links for more information about Coconut:
340
+
341
+ - Tutorial_: If you're new to Coconut, a good place to start is Coconut's **tutorial**.
342
+ - Documentation_: If you're looking for info about a specific feature, check out Coconut's **documentation**.
343
+ - `Online Interpreter`_: If you want to try Coconut in your browser, check out Coconut's **online interpreter**.
344
+ - FAQ_: If you have general questions about Coconut—like who Coconut is built for and whether or not you should use it—Coconut's frequently asked questions are often the best place to start.
345
+ - `Create a New Issue <https://github.com/evhub/coconut/issues/new>`_: If you're having a problem with Coconut, creating a new issue detailing the problem will allow it to be addressed as soon as possible.
346
+ - Gitter_: For any questions, concerns, or comments about anything Coconut-related, ask around at Coconut's Gitter, a GitHub-integrated chat room for Coconut developers.
347
+ - Releases_: Want to know what's been added in recent Coconut versions? Check out the release log for all the new features and fixes.
348
+
349
+ .. _Python: https://www.python.org/
350
+ .. _PyPI: https://pypi.python.org/pypi/coconut
351
+ .. _Tutorial: http://coconut.readthedocs.io/en/latest/HELP.html
352
+ .. _Documentation: http://coconut.readthedocs.io/en/latest/DOCS.html
353
+ .. _`Online Interpreter`: https://cs121-team-panda.github.io/coconut-interpreter
354
+ .. _FAQ: http://coconut.readthedocs.io/en/latest/FAQ.html
355
+ .. _GitHub: https://github.com/evhub/coconut
356
+ .. _Gitter: https://gitter.im/evhub/coconut
357
+ .. _Releases: https://github.com/evhub/coconut/releases
358
+
359
+ Credits
360
+ +++++++
361
+
362
+ Contributors
363
+ ------------
364
+
365
+ This project exists thanks to all the people who contribute! `Become a contributor`__.
366
+
367
+ .. image:: https://opencollective.com/coconut/contributors.svg?width=890&button=false
368
+ :target: https://github.com/evhub/coconut/graphs/contributors
369
+
370
+ __ Contributor_
371
+ .. _Contributor: http://coconut.readthedocs.io/en/develop/CONTRIBUTING.html
372
+
373
+ Backers
374
+ -------
375
+
376
+ Thank you to all our backers! `Become a backer`__.
377
+
378
+ .. image:: https://opencollective.com/coconut/backers.svg?width=890
379
+ :target: https://opencollective.com/coconut#backers
380
+
381
+ __ Backer_
382
+ .. _Backer: https://opencollective.com/coconut#backer
383
+
384
+ Sponsors
385
+ --------
386
+
387
+ Support Coconut by becoming a sponsor. Your logo will show up here with a link to your website. `Become a sponsor`__.
388
+
389
+ .. image:: https://opencollective.com/XX/sponsor/0/avatar.svg
390
+ :target: https://opencollective.com/coconut/sponsor/0/website
391
+
392
+ __ Sponsor_
393
+ .. _Sponsor: https://opencollective.com/coconut#sponsor
@@ -46,7 +46,7 @@ from coconut.constants import (
46
46
  never_clear_incremental_cache,
47
47
  warn_on_multiline_regex,
48
48
  num_displayed_timing_items,
49
- use_cache_file,
49
+ use_pyparsing_cache_file,
50
50
  use_line_by_line_parser,
51
51
  incremental_use_hybrid,
52
52
  )
@@ -254,7 +254,7 @@ SUPPORTS_ADAPTIVE = (
254
254
  and hasattr(MatchFirst, "setAdaptiveMode")
255
255
  )
256
256
 
257
- USE_CACHE = SUPPORTS_INCREMENTAL and use_cache_file
257
+ USE_CACHE = SUPPORTS_INCREMENTAL and use_pyparsing_cache_file
258
258
  USE_LINE_BY_LINE = USE_COMPUTATION_GRAPH and use_line_by_line_parser
259
259
 
260
260
  if MODERN_PYPARSING:
@@ -1995,8 +1995,17 @@ class Grammar(object):
1995
1995
 
1996
1996
  del_stmt = addspace(keyword("del") - simple_assignlist)
1997
1997
 
1998
- matchlist_data_item = Group(Optional(star | Optional(dot) + unsafe_name + equals) + match)
1999
- matchlist_data = Group(Optional(tokenlist(matchlist_data_item, comma)))
1998
+ interior_name_match = labeled_group(setname, "var")
1999
+ matchlist_anon_named_tuple_item = (
2000
+ Group(Optional(dot) + unsafe_name) + equals + match
2001
+ | Group(Optional(dot) + interior_name_match) + equals
2002
+ )
2003
+ matchlist_data_item = (
2004
+ matchlist_anon_named_tuple_item
2005
+ | Optional(star) + match
2006
+ )
2007
+ matchlist_data = Group(Optional(tokenlist(Group(matchlist_data_item), comma)))
2008
+ matchlist_anon_named_tuple = Optional(tokenlist(Group(matchlist_anon_named_tuple_item), comma))
2000
2009
 
2001
2010
  match_check_equals = Forward()
2002
2011
  match_check_equals_ref = equals
@@ -2031,7 +2040,6 @@ class Grammar(object):
2031
2040
  match_tuple = Group(lparen + matchlist_tuple + rparen.suppress())
2032
2041
  match_lazy = Group(lbanana + matchlist_list + rbanana.suppress())
2033
2042
 
2034
- interior_name_match = labeled_group(setname, "var")
2035
2043
  match_string = interleaved_tokenlist(
2036
2044
  # f_string_atom must come first
2037
2045
  f_string_atom("f_string") | fixed_len_string_tokens("string"),
@@ -2085,6 +2093,7 @@ class Grammar(object):
2085
2093
  | (keyword("data").suppress() + dotted_refname + lparen.suppress() + matchlist_data + rparen.suppress())("data")
2086
2094
  | (keyword("class").suppress() + dotted_refname + lparen.suppress() + matchlist_data + rparen.suppress())("class")
2087
2095
  | (dotted_refname + lparen.suppress() + matchlist_data + rparen.suppress())("data_or_class")
2096
+ | (lparen.suppress() + matchlist_anon_named_tuple + rparen.suppress())("anon_named_tuple")
2088
2097
  | Optional(keyword("as").suppress()) + setname("var"),
2089
2098
  )
2090
2099
 
@@ -150,6 +150,7 @@ class Matcher(object):
150
150
  "data": lambda self: self.match_data,
151
151
  "class": lambda self: self.match_class,
152
152
  "data_or_class": lambda self: self.match_data_or_class,
153
+ "anon_named_tuple": lambda self: self.match_anon_named_tuple,
153
154
  "paren": lambda self: self.match_paren,
154
155
  "as": lambda self: self.match_as,
155
156
  "and": lambda self: self.match_and,
@@ -1056,10 +1057,8 @@ if {assign_to} is _coconut_sentinel:
1056
1057
  for const in match:
1057
1058
  self.add_check(const + " in " + item)
1058
1059
 
1059
- def split_data_or_class_match(self, tokens):
1060
- """Split data/class match tokens into cls_name, pos_matches, name_matches, star_match."""
1061
- cls_name, matches = tokens
1062
-
1060
+ def split_data_or_class_matches(self, matches):
1061
+ """Split data/class match tokens into pos_matches, name_matches, star_match."""
1063
1062
  pos_matches = []
1064
1063
  name_matches = {}
1065
1064
  star_match = None
@@ -1073,8 +1072,7 @@ if {assign_to} is _coconut_sentinel:
1073
1072
  raise CoconutDeferredSyntaxError("positional arg after keyword arg in data/class match", self.loc)
1074
1073
  pos_matches.append(match)
1075
1074
  # starred arg
1076
- elif len(match_arg) == 2:
1077
- internal_assert(match_arg[0] == "*", "invalid starred data/class match arg tokens", match_arg)
1075
+ elif len(match_arg) == 2 and match_arg[0] == "*":
1078
1076
  _, match = match_arg
1079
1077
  if star_match is not None:
1080
1078
  raise CoconutDeferredSyntaxError("duplicate starred arg in data/class match", self.loc)
@@ -1083,23 +1081,30 @@ if {assign_to} is _coconut_sentinel:
1083
1081
  star_match = match
1084
1082
  # keyword arg
1085
1083
  else:
1084
+ internal_assert(match_arg[1] == "=", "invalid keyword data/class match arg tokens", match_arg)
1086
1085
  if len(match_arg) == 3:
1087
- internal_assert(match_arg[1] == "=", "invalid keyword data/class match arg tokens", match_arg)
1088
- name, _, match = match_arg
1089
- strict = False
1090
- elif len(match_arg) == 4:
1091
- internal_assert(match_arg[0] == "." and match_arg[2] == "=", "invalid strict keyword data/class match arg tokens", match_arg)
1092
- _, name, _, match = match_arg
1093
- strict = True
1086
+ name_grp, _, match = match_arg
1087
+ elif len(match_arg) == 2:
1088
+ match_grp, _ = match_arg
1089
+ match = match_grp[-1]
1090
+ name, = match
1091
+ name_grp = match_grp[:-1] + [name]
1094
1092
  else:
1095
1093
  raise CoconutInternalException("invalid data/class match arg", match_arg)
1094
+ if len(name_grp) == 1:
1095
+ name, = name_grp
1096
+ strict = False
1097
+ else:
1098
+ internal_assert(name_grp[0] == ".", "invalid keyword data/class match arg tokens", name_grp)
1099
+ _, name = name_grp
1100
+ strict = True
1096
1101
  if star_match is not None:
1097
1102
  raise CoconutDeferredSyntaxError("both keyword arg and starred arg in data/class match", self.loc)
1098
1103
  if name in name_matches:
1099
1104
  raise CoconutDeferredSyntaxError("duplicate keyword arg {name!r} in data/class match".format(name=name), self.loc)
1100
1105
  name_matches[name] = (match, strict)
1101
1106
 
1102
- return cls_name, pos_matches, name_matches, star_match
1107
+ return pos_matches, name_matches, star_match
1103
1108
 
1104
1109
  def match_class_attr(self, match, attr, item):
1105
1110
  """Match an attribute for a class match where attr is an expression that evaluates to the attribute name."""
@@ -1119,7 +1124,8 @@ if {assign_to} is _coconut_sentinel:
1119
1124
 
1120
1125
  def match_class(self, tokens, item):
1121
1126
  """Matches a class PEP-622-style."""
1122
- cls_name, pos_matches, name_matches, star_match = self.split_data_or_class_match(tokens)
1127
+ cls_name, matches = tokens
1128
+ pos_matches, name_matches, star_match = self.split_data_or_class_matches(matches)
1123
1129
 
1124
1130
  self.add_check("_coconut.isinstance(" + item + ", " + cls_name + ")")
1125
1131
 
@@ -1191,7 +1197,8 @@ if _coconut.len({match_args_var}) < {num_pos_matches}:
1191
1197
 
1192
1198
  def match_data(self, tokens, item):
1193
1199
  """Matches a data type."""
1194
- cls_name, pos_matches, name_matches, star_match = self.split_data_or_class_match(tokens)
1200
+ cls_name, matches = tokens
1201
+ pos_matches, name_matches, star_match = self.split_data_or_class_matches(matches)
1195
1202
 
1196
1203
  self.add_check("_coconut.isinstance(" + item + ", " + cls_name + ")")
1197
1204
 
@@ -1240,6 +1247,17 @@ if _coconut.len({match_args_var}) < {num_pos_matches}:
1240
1247
  with self.down_a_level():
1241
1248
  self.add_check(temp_var)
1242
1249
 
1250
+ def match_anon_named_tuple(self, tokens, item):
1251
+ """Matches an anonymous named tuple pattern."""
1252
+ pos_matches, name_matches, star_match = self.split_data_or_class_matches(tokens)
1253
+ internal_assert(not pos_matches and not star_match, "got invalid pos/star matches in anon named tuple pattern", (pos_matches, star_match))
1254
+ self.add_check("_coconut.isinstance(" + item + ", tuple)")
1255
+ self.add_check("_coconut.len({item}) == {expected_len}".format(
1256
+ item=item,
1257
+ expected_len=len(name_matches),
1258
+ ))
1259
+ self.match_class_names(name_matches, item)
1260
+
1243
1261
  def match_data_or_class(self, tokens, item):
1244
1262
  """Matches an ambiguous data or class match."""
1245
1263
  cls_name, matches = tokens
@@ -135,7 +135,7 @@ packrat_cache_size = None # only works because final() clears the cache
135
135
 
136
136
  streamline_grammar_for_len = 1536
137
137
 
138
- use_cache_file = True
138
+ use_pyparsing_cache_file = True
139
139
 
140
140
  adaptive_any_of_env_var = "COCONUT_ADAPTIVE_ANY_OF"
141
141
  use_adaptive_any_of = get_bool_env_var(adaptive_any_of_env_var, True)
@@ -638,7 +638,7 @@ main_sig = "Coconut: "
638
638
  main_prompt = ">>> "
639
639
  more_prompt = " "
640
640
 
641
- default_use_cache_dir = PY34
641
+ default_use_cache_dir = get_bool_env_var("COCONUT_USE_COCONUT_CACHE", PY34)
642
642
  coconut_cache_dir = "__coconut_cache__"
643
643
 
644
644
  mypy_path_env_var = "MYPYPATH"
@@ -0,0 +1,11 @@
1
+ {
2
+ "argv": [
3
+ "python",
4
+ "-m",
5
+ "coconut.icoconut",
6
+ "-f",
7
+ "{connection_file}"
8
+ ],
9
+ "display_name": "Coconut",
10
+ "language": "coconut"
11
+ }
@@ -26,7 +26,7 @@ import sys as _coconut_sys
26
26
  VERSION = "3.1.1"
27
27
  VERSION_NAME = None
28
28
  # False for release, int >= 1 for develop
29
- DEVELOP = 2
29
+ DEVELOP = 3
30
30
  ALPHA = False # for pre releases rather than post releases
31
31
 
32
32
  assert DEVELOP is False or DEVELOP >= 1, "DEVELOP must be False or an int >= 1"
@@ -466,6 +466,27 @@ def primary_test_2() -> bool:
466
466
  """ == '\n"2"\n'
467
467
  assert f"\{1}" == "\\1"
468
468
  assert f''' '{1}' ''' == " '1' "
469
+ tuple(x=) = (x=4)
470
+ assert x == 4
471
+ tuple(x=, y=) = (x=5, y=5)
472
+ assert x == 5 == y
473
+ data tuple(x=) = (x=6)
474
+ assert x == 6
475
+ class tuple(x=) = (x=7)
476
+ assert x == 7
477
+ data tuple(x, y=) = (x=8, y=8)
478
+ assert x == 8 == y
479
+ (x=, y=) = (x=9, y=9)
480
+ assert x == 9 == y
481
+ (x=x) = (x=10)
482
+ assert x == 10
483
+ (x=, y=y) = (x=11, y=11)
484
+ assert x == 11 == y
485
+ tuple(x=) = (x=12, y=12)
486
+ assert x == 12
487
+ match (x=) in (x=13, y=13):
488
+ assert False
489
+ assert x == 12
469
490
 
470
491
  with process_map.multiple_sequential_calls(): # type: ignore
471
492
  assert map((+), range(3), range(4)$[:-1], strict=True) |> list == [0, 2, 4] == process_map((+), range(3), range(4)$[:-1], strict=True) |> list # type: ignore
@@ -1,141 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: coconut-develop
3
- Version: 3.1.1.post0.dev2
4
- Summary: Simple, elegant, Pythonic functional programming.
5
- Home-page: http://coconut-lang.org
6
- Author: Evan Hubinger
7
- Author-email: evanjhub@gmail.com
8
- License: Apache 2.0
9
- Description: |logo| Coconut
10
- ==============
11
-
12
- ..
13
- <insert toctree here>
14
-
15
- .. |logo| image:: https://github.com/evhub/coconut/raw/gh-pages/favicon-32x32.png
16
-
17
- .. image:: https://opencollective.com/coconut/backers/badge.svg
18
- :alt: Backers on Open Collective
19
- :target: #backers
20
- .. image:: https://opencollective.com/coconut/sponsors/badge.svg
21
- :alt: Sponsors on Open Collective
22
- :target: #sponsors
23
- .. image:: https://badges.gitter.im/evhub/coconut.svg
24
- :alt: Join the chat at https://gitter.im/evhub/coconut
25
- :target: https://gitter.im/evhub/coconut?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
26
-
27
- Coconut (`coconut-lang.org`__) is a variant of Python_ that **adds on top of Python syntax** new features for simple, elegant, Pythonic **functional programming**.
28
-
29
- __ Coconut_
30
- .. _Coconut: http://coconut-lang.org/
31
-
32
- Coconut is developed on GitHub_ and hosted on PyPI_. Installing Coconut is as easy as opening a command prompt and entering::
33
-
34
- pip install coconut
35
-
36
- To help you get started, check out these links for more information about Coconut:
37
-
38
- - Tutorial_: If you're new to Coconut, a good place to start is Coconut's **tutorial**.
39
- - Documentation_: If you're looking for info about a specific feature, check out Coconut's **documentation**.
40
- - `Online Interpreter`_: If you want to try Coconut in your browser, check out Coconut's **online interpreter**.
41
- - FAQ_: If you have general questions about Coconut—like who Coconut is built for and whether or not you should use it—Coconut's frequently asked questions are often the best place to start.
42
- - `Create a New Issue <https://github.com/evhub/coconut/issues/new>`_: If you're having a problem with Coconut, creating a new issue detailing the problem will allow it to be addressed as soon as possible.
43
- - Gitter_: For any questions, concerns, or comments about anything Coconut-related, ask around at Coconut's Gitter, a GitHub-integrated chat room for Coconut developers.
44
- - Releases_: Want to know what's been added in recent Coconut versions? Check out the release log for all the new features and fixes.
45
-
46
- .. _Python: https://www.python.org/
47
- .. _PyPI: https://pypi.python.org/pypi/coconut
48
- .. _Tutorial: http://coconut.readthedocs.io/en/latest/HELP.html
49
- .. _Documentation: http://coconut.readthedocs.io/en/latest/DOCS.html
50
- .. _`Online Interpreter`: https://cs121-team-panda.github.io/coconut-interpreter
51
- .. _FAQ: http://coconut.readthedocs.io/en/latest/FAQ.html
52
- .. _GitHub: https://github.com/evhub/coconut
53
- .. _Gitter: https://gitter.im/evhub/coconut
54
- .. _Releases: https://github.com/evhub/coconut/releases
55
-
56
- Credits
57
- +++++++
58
-
59
- Contributors
60
- ------------
61
-
62
- This project exists thanks to all the people who contribute! `Become a contributor`__.
63
-
64
- .. image:: https://opencollective.com/coconut/contributors.svg?width=890&button=false
65
- :target: https://github.com/evhub/coconut/graphs/contributors
66
-
67
- __ Contributor_
68
- .. _Contributor: http://coconut.readthedocs.io/en/develop/CONTRIBUTING.html
69
-
70
- Backers
71
- -------
72
-
73
- Thank you to all our backers! `Become a backer`__.
74
-
75
- .. image:: https://opencollective.com/coconut/backers.svg?width=890
76
- :target: https://opencollective.com/coconut#backers
77
-
78
- __ Backer_
79
- .. _Backer: https://opencollective.com/coconut#backer
80
-
81
- Sponsors
82
- --------
83
-
84
- Support Coconut by becoming a sponsor. Your logo will show up here with a link to your website. `Become a sponsor`__.
85
-
86
- .. image:: https://opencollective.com/XX/sponsor/0/avatar.svg
87
- :target: https://opencollective.com/coconut/sponsor/0/website
88
-
89
- __ Sponsor_
90
- .. _Sponsor: https://opencollective.com/coconut#sponsor
91
-
92
- Keywords: functional,programming,language,compiler,pattern,pattern-matching,algebraic,data type,data types,lambda,lambdas,lazy,evaluation,lazy list,lazy lists,tail,recursion,call,recursive,recursive_iterator,infix,function,composition,compose,partial,application,currying,curry,pipeline,pipe,unicode,operator,operators,frozenset,literal,syntax,destructuring,assignment,fold,datamaker,prepattern,iterator,generator,none,coalesce,coalescing,statement,lru_cache,memoization,backport,typing,embed,PEP 622,overrides,islice,itertools,functools,TYPE_CHECKING,Expected,breakpoint,help,reduce,takewhile,dropwhile,tee,count,makedata,consume,process_map,thread_map,addpattern,recursive_generator,fmap,starmap,reiterable,scan,groupsof,memoize,zip_longest,override,flatten,ident,call,safe_call,flip,const,lift,lift_apart,all_equal,collectby,mapreduce,multi_enumerate,cartesian_product,multiset,cycle,windowsof,and_then,and_then_await,async_map,py_chr,py_dict,py_hex,py_input,py_int,py_map,py_object,py_oct,py_open,py_print,py_range,py_str,py_super,py_zip,py_filter,py_reversed,py_enumerate,py_raw_input,py_xrange,py_repr,py_breakpoint,py_min,py_max,_namedtuple_of,reveal_type,reveal_locals,MatchError,CoconutWarning,__fmap__,__iter_getitem__,data,match,case,cases,where,addpattern,then,operator,type,copyclosure,λ
93
- Platform: UNKNOWN
94
- Classifier: Development Status :: 5 - Production/Stable
95
- Classifier: License :: OSI Approved :: Apache Software License
96
- Classifier: Intended Audience :: Developers
97
- Classifier: Topic :: Software Development
98
- Classifier: Topic :: Software Development :: Code Generators
99
- Classifier: Topic :: Software Development :: Compilers
100
- Classifier: Topic :: Software Development :: Interpreters
101
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
102
- Classifier: Topic :: Utilities
103
- Classifier: Environment :: Console
104
- Classifier: Operating System :: OS Independent
105
- Classifier: Programming Language :: Python
106
- Classifier: Programming Language :: Python :: 2
107
- Classifier: Programming Language :: Python :: 2.6
108
- Classifier: Programming Language :: Python :: 2.7
109
- Classifier: Programming Language :: Python :: 3
110
- Classifier: Programming Language :: Python :: 3.2
111
- Classifier: Programming Language :: Python :: 3.3
112
- Classifier: Programming Language :: Python :: 3.4
113
- Classifier: Programming Language :: Python :: 3.5
114
- Classifier: Programming Language :: Python :: 3.6
115
- Classifier: Programming Language :: Python :: 3.7
116
- Classifier: Programming Language :: Python :: 3.8
117
- Classifier: Programming Language :: Python :: 3.9
118
- Classifier: Programming Language :: Python :: 3.10
119
- Classifier: Programming Language :: Python :: 3.11
120
- Classifier: Programming Language :: Python :: 3.12
121
- Classifier: Programming Language :: Other
122
- Classifier: Programming Language :: Other Scripting Engines
123
- Classifier: Programming Language :: Python :: Implementation :: CPython
124
- Classifier: Programming Language :: Python :: Implementation :: PyPy
125
- Classifier: Framework :: IPython
126
- Classifier: Framework :: Jupyter
127
- Classifier: Typing :: Typed
128
- Provides-Extra: kernel
129
- Provides-Extra: watch
130
- Provides-Extra: mypy
131
- Provides-Extra: pyright
132
- Provides-Extra: xonsh
133
- Provides-Extra: numpy
134
- Provides-Extra: jupyter
135
- Provides-Extra: jupyterlab
136
- Provides-Extra: jupytext
137
- Provides-Extra: all
138
- Provides-Extra: ipython
139
- Provides-Extra: docs
140
- Provides-Extra: tests
141
- Provides-Extra: dev
@@ -1,11 +0,0 @@
1
- {
2
- "argv": [
3
- "python",
4
- "-m",
5
- "coconut.icoconut",
6
- "-f",
7
- "{connection_file}"
8
- ],
9
- "display_name": "Coconut",
10
- "language": "coconut"
11
- }