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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: frigid
3
- Version: 2.0
3
+ Version: 2.0rc0
4
4
  Summary: Immutable data structures.
5
5
  Project-URL: Homepage, https://github.com/emcd/python-frigid
6
6
  Project-URL: Documentation, https://emcd.github.io/python-frigid
@@ -43,7 +43,7 @@ from .objects import *
43
43
  from .sequences import *
44
44
 
45
45
 
46
- __version__ = '2.0'
46
+ __version__ = '2.0rc0'
47
47
 
48
48
 
49
49
  _attribute_visibility_includes_ = frozenset( ( '__version__', ) )
@@ -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