frigid 2.0__tar.gz → 2.0rc0__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.
- {frigid-2.0 → frigid-2.0rc0}/PKG-INFO +1 -1
- {frigid-2.0 → frigid-2.0rc0}/sources/frigid/__init__.py +1 -1
- {frigid-2.0 → frigid-2.0rc0}/sources/frigid/installers.py +11 -1
- {frigid-2.0 → frigid-2.0rc0}/sources/frigid/sequences.py +8 -0
- {frigid-2.0 → frigid-2.0rc0}/.gitignore +0 -0
- {frigid-2.0 → frigid-2.0rc0}/LICENSE.txt +0 -0
- {frigid-2.0 → frigid-2.0rc0}/README.rst +0 -0
- {frigid-2.0 → frigid-2.0rc0}/pyproject.toml +0 -0
- {frigid-2.0 → frigid-2.0rc0}/sources/frigid/__/__init__.py +0 -0
- {frigid-2.0 → frigid-2.0rc0}/sources/frigid/__/dictionaries.py +0 -0
- {frigid-2.0 → frigid-2.0rc0}/sources/frigid/__/docstrings.py +0 -0
- {frigid-2.0 → frigid-2.0rc0}/sources/frigid/__/doctab.py +0 -0
- {frigid-2.0 → frigid-2.0rc0}/sources/frigid/__/immutables.py +0 -0
- {frigid-2.0 → frigid-2.0rc0}/sources/frigid/__/imports.py +0 -0
- {frigid-2.0 → frigid-2.0rc0}/sources/frigid/_typedecls/__builtins__.pyi +0 -0
- {frigid-2.0 → frigid-2.0rc0}/sources/frigid/classes.py +0 -0
- {frigid-2.0 → frigid-2.0rc0}/sources/frigid/dictionaries.py +0 -0
- {frigid-2.0 → frigid-2.0rc0}/sources/frigid/exceptions.py +0 -0
- {frigid-2.0 → frigid-2.0rc0}/sources/frigid/modules.py +0 -0
- {frigid-2.0 → frigid-2.0rc0}/sources/frigid/namespaces.py +0 -0
- {frigid-2.0 → frigid-2.0rc0}/sources/frigid/objects.py +0 -0
- {frigid-2.0 → frigid-2.0rc0}/sources/frigid/py.typed +0 -0
- {frigid-2.0 → frigid-2.0rc0}/sources/frigid/qaliases.py +0 -0
|
@@ -33,7 +33,17 @@ def install(
|
|
|
33
33
|
'Name to use for single function in builtins. ``None`` to skip.' )
|
|
34
34
|
] = 'one',
|
|
35
35
|
) -> None:
|
|
36
|
-
''' Installs 1-element tuple constructor into builtins.
|
|
36
|
+
''' Installs 1-element tuple constructor into builtins.
|
|
37
|
+
|
|
38
|
+
Example
|
|
39
|
+
-------
|
|
40
|
+
>>> install( ) # Installs as 'one'
|
|
41
|
+
>>> one( 42 ) # Now available in builtins
|
|
42
|
+
(42,)
|
|
43
|
+
>>> install( single_name = 'single' ) # Install with custom name
|
|
44
|
+
>>> single( 42 )
|
|
45
|
+
(42,)
|
|
46
|
+
'''
|
|
37
47
|
builtins = __import__( 'builtins' )
|
|
38
48
|
if single_name:
|
|
39
49
|
from .sequences import one
|
|
@@ -39,5 +39,13 @@ def one( value: _V ) -> tuple[ _V, ... ]:
|
|
|
39
39
|
|
|
40
40
|
* List comprehensions and generator expressions
|
|
41
41
|
* Situations where formatter behavior with trailing commas is undesired
|
|
42
|
+
|
|
43
|
+
Example
|
|
44
|
+
-------
|
|
45
|
+
>>> one( 42 )
|
|
46
|
+
(42,)
|
|
47
|
+
>>> result = [ one( x ) for x in range( 3 ) ]
|
|
48
|
+
>>> result
|
|
49
|
+
[(0,), (1,), (2,)]
|
|
42
50
|
'''
|
|
43
51
|
return value, # pylint: disable=trailing-comma-tuple
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|